Mind your Ps and Qs
In RSA, a small e value can be problematic, but what about N? Can you decrypt this? values


Last updated
In RSA, a small e value can be problematic, but what about N? Can you decrypt this? values


Last updated
p = 2434792384523484381583634042478415057961
q = 650809615742055581459820253356987396346063from Crypto.Util import *
c = 964354128913912393938480857590969826308054462950561875638492039363373779803642185
n = 1584586296183412107468474423529992275940096154074798537916936609523894209759157543
e = 65537
p = 2434792384523484381583634042478415057961
q = 650809615742055581459820253356987396346063
en = (p-1)*(q-1)
d = number.inverse(e, en)
flag = pow(c, d, n)
decrypted_bytes = flag.to_bytes((flag.bit_length() + 7) // 8, byteorder='big')
print(decrypted_bytes.decode())