SHARE
TWEET

eliptic curves

a guest Jun 10th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---generator---
  2.  
  3. p = randomprime(2^7);
  4. while( lift(Mod(p,4)) != 3, p = randomprime(2^7));
  5. print(p);
  6. a = random(2^7);
  7. b = random(2^7);
  8. delta = 4*a^3+27*b
  9. while( lift(Mod(delta,p)) != 0, a = random(p); b = random(p);delta = 4*a^3+27*b);
  10. print ("a = "  a);
  11. print ("b = "  b);
  12. print ("p = "  p);
  13.  
  14. ---sprawdzarka---
  15. x = random(p);
  16. k = x^3+a*x+b;
  17. f = lift(Mod(k,p));
  18. while( lift(Mod(f,p)^((p-1)/2)) != (p-1), x = random(p); k = x^3+a*x+b;f = lift(Mod(k,p)));
  19. y = lift(Mod(f,p)^((p+1)/4));
  20. if(lift(Mod(y^2,p))!=k,print("false"),print("true"))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top