elgamal
elgamal copied to clipboard
Tests of find_primitime_root
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.
I think here https://github.com/RyanRiddle/elgamal/blob/master/elgamal.py#L172 is wrong assumtion about only 2 divisors.