Skip to content

Instantly share code, notes, and snippets.

@AndyNovo
Created November 4, 2024 13:19
Show Gist options
  • Save AndyNovo/aad547c109c0dc38db727ce9a4e6c0a1 to your computer and use it in GitHub Desktop.
Save AndyNovo/aad547c109c0dc38db727ce9a4e6c0a1 to your computer and use it in GitHub Desktop.
In [1]: from Crypto.Util.number import *
In [2]: p=getPrime(128)
In [3]: q=getPrime(128)
In [4]: N = p*q
In [5]: print(N)
54408918672288458111106941755870943090629412126910795351389441506593183100903
In [6]: msg=b"ninja{REDACTED}"
In [7]: pow(bytes_to_long(msg), 65537, N)
Out[7]: 32786395605021702763065814748314914084064738413969750274681994820410517712324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment