Skip to content

Instantly share code, notes, and snippets.

@GiacomoPope
Created August 5, 2021 09:35
Show Gist options
  • Save GiacomoPope/618c9a703f32eeef6ddce3d26fffdc41 to your computer and use it in GitHub Desktop.
Save GiacomoPope/618c9a703f32eeef6ddce3d26fffdc41 to your computer and use it in GitHub Desktop.
# http://www.monnerat.info/publications/anomalous.pdf
def anon_prime(m):
while True:
p = (19*m*(m + 1)) + 5
if is_prime(p):
return p
m += 1
def anom_curve():
m = 2**64 # Set approx size of p
p = anon_prime(m)
E = EllipticCurve(GF(p), j=j_D)
if E.order() == p:
return E
E1 = E.quadratic_twist()
assert E1.order() == p
return E1
D = 19
j_D = -2^15*3^3
E = anom_curve()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment