testcurve 532 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env sage
  2. import sys
  3. from sage.all import *
  4. r = 21888242871839275222246405745257275088548364400416034343698204186575808495617
  5. F = GF(r)
  6. b = 7950939520449436327800262930799465135910802758673292356620796789196167463969
  7. btwist = F(b)*125
  8. print "b =", b
  9. print "btwist =", btwist
  10. E = EllipticCurve(F, [-3, b])
  11. print E
  12. Ec = E.cardinality()
  13. print "Ec =", Ec
  14. assert(Ec in Primes())
  15. Et = EllipticCurve(F, [-75, btwist])
  16. print Et
  17. Etc = Et.cardinality()
  18. print "Etc =", Etc
  19. assert(Etc in Primes())
  20. assert(Ec + Etc == 2*r+2)