2

I'm doing a few exercises regarding Schnorr's identification scheme. I have the exercise starting off like this, with the values defined:

Let $p = 311$ and $r = 31\ |\ (p - 1)$. Let $g = 169$, which has order $r$.

I just really can't figure out what the vertical bar means here?

Sometimes in discrete maths, a vertical bar means absolute value, sometimes two them are cardinalty? Programming would suggest that it means a logical or?

One place I saw something indicating that it might be xor, but I really have no idea.

fgrieu
  • 140,762
  • 12
  • 307
  • 587
Garsty100
  • 23
  • 2
  • 1
    Do you have more context? $|$ can also mean divides in that 31 divides 310, but it doesn't make sense to assign that to $r$ – Aman Grewal May 18 '21 at 15:57
  • @AmanGrewal This is apparently a widely used problem, see https://books.google.com/books?id=owd76BElvosC&pg=PA456&lpg=PA456&dq=schnorr+identification+%22311%22+31&source=bl&ots=zNHexZBHgX&sig=ACfU3U3z93wmItSVguC_sAX24c_VTXI5_A&hl=en&sa=X&ved=2ahUKEwiSvfmE2NPwAhXaQc0KHaJjDiYQ6AEwEnoECBUQAw#v=onepage&q=schnorr%20identification%20%22311%22%2031&f=false for one example. – Swashbuckler May 18 '21 at 16:52

1 Answers1

5

The meaning of that $\ \vert\ $ in this context is divides (as in evenly divides, or is a divisor of), and that's a standard usage of this sign. The quote should be read as:

let $p=311$ and $r=31$, which divides $(p-1)$. Let $g=169$

In other words: $r$ is a divisor of $p-1$. Or, exists integer $q$ with $r\times q=p-1$. Or, $((p-1)\bmod r)=0$, also writable as $p-1\bmod r=0$ or $p-1\equiv0\pmod r$ or $p\equiv1\pmod r$. In many common programing languages, (p-1)%r == 0. That's because $31$ (evenly) divides $311-1$, since $31\times10=310$.

That was correctly guessed by Aman Grewal in comment, but as noted, proximity with the assignment makes the notation confusing. Elision of the implied which is something I would try to avoid.


The end of the sentence says «Let $g=169$, which has order $r$». Does that mean that $g$ is really 169%31?

No. The term order is used in its meaning in group theory. In this context, it means that when we repeatedly multiply $1$ by $g$, reducing modulo $p$ after each multiplication, we'll first get back to $1$ after performing $r$ multiplications. That's related to $r\,\vert\,(p-1)$, because the order of any element in a finite group is a divisor of the order of the group, that is the number of elements in the group. Here the group is the multiplicative group modulo $p$, noted $\mathbb Z_p^*$ or $(\mathbb Z/p\mathbb Z)^\times$, which has $p-1$ elements since $p$ is prime. The powers of $g$ form a subgroup of order $r$, called a Schnorr group.

fgrieu
  • 140,762
  • 12
  • 307
  • 587