Skip to content

Instantly share code, notes, and snippets.

@AndyNovo
Created November 17, 2021 20:01
Show Gist options
  • Save AndyNovo/cbee556a99b0157c5a2ea294f387c46b to your computer and use it in GitHub Desktop.
Save AndyNovo/cbee556a99b0157c5a2ea294f387c46b to your computer and use it in GitHub Desktop.
25017259402101042834893168891512493864144846339102620774259773144719592882432753847660918744388865365216865664444737013300348294744742362212268236941577218878217284532134739460296957944344830607681654911690141474659162735021342534150642060706828406708953985407954152203744601353921840940568971644500973111767857233598862612491733757338322610859991475817866573659812035274260302902979605607426288401980603466385793432223418580653530728315197672477180179480616713094967221745382248871901646645480826285867256391892892611393878187524337723699151989776728888853430655434258192253121031637774402689610636888511382130113059
65537
21075913733025308204908237548826071489979427630045328811045973157504116933474773728952935904569411978270861890940085946991483661551175441685346429581015730377279907184293904635866769302719680155250790794672657942052536118789930117855328704584066168931883673037180685225627145531793369795163617932081346595665536139357250919526483905742942976704482538800064399452966622629992874732060970935773407782028377316947246576684995385333861003609238218712811537655385082383935374351114260527199126990326701976813456818540063812807223732249413059900904691295095987562314584399468001856564144325151882953420900156112055251481072
from Crypto.Util.number import *
import sympy.ntheory as nt
import random
p=getPrime(1024)
q=nt.nextprime(p)
for _ in range(random.randint(500,10000)):
q=nt.nextprime(q)
N=p*q
msg="ninja{REDACTED}"
pt=bytes_to_long(msg)
e=65537
ct=pow(pt,e,N)
print N
print e
print ct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment