Quote:
Also, the method for working out r in the paper, is:
· q > floor ((log n)^2)
· Compute n^j mod q for j = 1, 2,…,[(logn)^2]
· If residue equals 1 mod q then q++
· Else r = q
(I'm assuming they mean log to base 10)
Here's how I would work out r if n = 31
q = floor(log(31)^2) = floor(2.224...) = 2
31 mod 2 = 1 (so q++)
31 mod 3 = 1 (so q++)
31 mod 4 = 4
31^2 mod 4 = 1 (so q++)
31 mod 5 = 1 (so q++)
31 mod 6 = 1 (so q++)
31 mod 7 = 3
31^2 mod 7 = 2
so r = 7
The notation q > floor(log^2 n) means you should start at floor(log^2 n) + 1, not floor(log^2 n). The bullet points are, to be honest, not very clear or well done. They require an understanding of the multiplicative order of n, mod r, to interpret, which is circular. What they meant to write but wanted to be more concise than was...