Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Solving an equation with modulo

I am trying to solve for k where p to the power of k is congruent to 1 modulo l. I have the following code:

p = 2^255-19;

l = 57896044618658097711785492504343953926634992332820282019728792003956564819949;

var('k')

sorted(solve_mod(p^k == 1, l))

but I get this really long error message when I try to run it. How do I solve this equation without getting errors?

I was trying to find the embedding degree for this elliptic curve:

sage: E = EllipticCurve(GF(p),[0,486662,0,1,0])