Skip to content

Instantly share code, notes, and snippets.

@adibenc
Created August 10, 2019 04:45
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 adibenc/8ba7e9eaf8a45abecb905fa90640c62e to your computer and use it in GitHub Desktop.
Save adibenc/8ba7e9eaf8a45abecb905fa90640c62e to your computer and use it in GitHub Desktop.
babyrsa
# n = 2531257
# d = 58739
# acip=[906851,991083,1780304,2380434,438490,356019,921472,822283,817856,556932,2102538,2501908,2211404,991083,1562919,38268]
e = 0x10001
# 65537
n = 0x54012066b18843995165c3c0d783aa9e31e796f6928ea4bfe0728b1d1bad6271
# 37996269752553143762620204978239299540564965267273808381787520677145280864881
#194926318778540379438386258755918352359**2
n = 0x54012066b18843995165c3c0d783aa9e31e796f6928ea4bfe0728b1d16271
# 5*109*622124059*1026374991959865302086272367019854956030269480779
d = 12750799221868602568482710426599234577
# acip=[]
acip=[348, 0, 253, 949, 519, 252, 920, 809, 248, 566, 711, 794, 866, 65, 688, 54, 99, 409, 268, 745, 427, 5, 172, 111, 480]
amsg=[]
print acip
i=1
for cip in acip:
print i
print "cip",cip
m = pow(cip,d,n)
print "m",m
#(2531257, 43)
amsg.append(m)
print "cip",pow(m,e,n)
i+=1
print amsg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment