Skip to content

Instantly share code, notes, and snippets.

@Yidaotus
Last active April 20, 2023 07:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yidaotus/eb551f9a68a00d5606f71970578a35be to your computer and use it in GitHub Desktop.
Save Yidaotus/eb551f9a68a00d5606f71970578a35be to your computer and use it in GitHub Desktop.
ADRIEN'S SIGNS
message = [67594220461269, 501237540280788, 718316769824518, 296304224247167, 48290626940198, 30829701196032, 521453693392074, <...> ]
p = 1007621497415251
exponent = int((p-1)/2)
bresult = [1 if pow(m, exponent, p) == 1 else 0 for m in message]
bresultgroup = [''.join(str(y) for y in bresult[x:x+8]) for x in range(0, len(bresult), 8)]
''.join([chr(int(x, 2)) for x in bresultgroup])
@OkiStuff
Copy link

gers says thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment