Skip to content

Instantly share code, notes, and snippets.

@autotaker
Created June 19, 2017 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save autotaker/836785ae9283d2abfa02fbe51a832c0e to your computer and use it in GitHub Desktop.
Save autotaker/836785ae9283d2abfa02fbe51a832c0e to your computer and use it in GitHub Desktop.
p = 606341371901192354470259703076328716992246317693812238045286463;
g = [ 160057538006753370699321703048317480466874572114764155861735009, 255466303302648575056527135374882065819706963269525464635673824] * Mod(1,p)
A = [460868776123995205521652669050817772789692922946697572502806062, 263320455545743566732526866838203345604600592515673506653173727] * Mod(1,p)
B = [ 270400597838364567126384881699673470955074338456296574231734133, 526337866156590745463188427547342121612334530789375115287956485] * Mod(1,p)
Y0 = (g[1] / g[2] - 1);
Y1 = (A[1] / A[2] - 1);
Y2 = (B[1] / B[2] - 1);
r1 = znlog(Y1,Y0);
r2 = znlog(Y2,Y0);
print(r1);
print(r2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment