Skip to content

Instantly share code, notes, and snippets.

@AndyNovo
Last active December 1, 2021 18:37
Show Gist options
  • Save AndyNovo/655871eb010962e102649b8138dfbfc7 to your computer and use it in GitHub Desktop.
Save AndyNovo/655871eb010962e102649b8138dfbfc7 to your computer and use it in GitHub Desktop.
60428717418617002424136163342235870082015848061313919956581032458200244389629190884586681972485805930369981457484599639028843401181081422750653659754421362036005159692535642566409824215238636422982015314099737744947911260559692583227169363759161105206118255825924826808804827320851860551234330343205812483857
65537
44502216908401511245883042064564939394160978903986047882810226122782105069615245864176960997262753751242367580530220843587427887071457362361495769020842812697124589456499860508132506132926739005389641818231849295625298626157997132120847495917821527810797753812005874478096588213573689043250717235014786299801
from sympy import *
from Crypto.Util.number import *
import random
p=getPrime(512)
q = nextprime(p + random.randint(10**9,10**10))
N=p*q
msg="ninja{REDACTED}"
pt = bytes_to_long(msg)
ct = pow(pt, 65537, N)
print N
print 65537
print ct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment