elgamal icon indicating copy to clipboard operation
elgamal copied to clipboard

Tests of find_primitime_root

Open webhive opened this issue 6 years ago • 1 comments

Tested find_primitime_root function over known values from here https://en.wikipedia.org/wiki/Primitive_root_modulo_n#Elementary_example

So something goes wrong. Pretty often your function generate wrong value.

Prepared tests to check it. To reproduce need to run tests several times.

webhive avatar Mar 14 '20 16:03 webhive

I think here https://github.com/RyanRiddle/elgamal/blob/master/elgamal.py#L172 is wrong assumtion about only 2 divisors.

webhive avatar Mar 14 '20 22:03 webhive