Skip to content
Snippets Groups Projects
Commit 8b321f51 authored by nicolas.albanesi's avatar nicolas.albanesi
Browse files

asldasld

parent 073bbdb3
No related branches found
No related tags found
No related merge requests found
from exp_rapide import *
from private_key import *
if __name__ == '__main__':
n = 124344401
e = 1919
msg = [68393426, 89432542, 115521861, 49234219, 3372048, 122157013, 22349186, 35164123, 34100658, 53001833, 22308360, 27268540, 105477840, 16762760, 113133501, 37039778, 89387590, 82947194, 52601869, 118123698, 68691007, 51830717, 118914410, 22002115, 99813173, 27268540, 120352256, 64650097, 92433385, 414607, 72100751, 23998007, 66133841, 35164123, 74691367, 80836310, 5505466, 59202893, 115463881, 46024313, 74620807, 37361822, 110605220, 80046495, 99953354, 84193611, 89956350, 55477753, 18387435, 5325873, 73193855, 48738452, 33336672, 89963322, 122314690, 4452285, 110289672, 106228774, 31142434, 414607, 88872943, 29217724, 88230256, 89956350, 55477753, 18387435, 108347427, 7851834, 76320201, 34059930, 82599280, 108347427, 92752873, 64650097, 92433385, 414607, 72100751, 112081917, 4440942, 54795823, 120183171, 44819012, 55032737, 87655596, 105198146, 63239385, 33230638, 10365063, 115372183, 71955667, 115564528, 17503687, 115564528, 5325873, 36896144, 99693494, 111498758, 7774636, 105885047]
decoded = []
p, q = find_p_q(n)
d = find_private_key(p, q, e)
print(f"p : {p}")
print(f"q : {q}")
print(f"d : {d}")
for m in msg:
decoded.append(str(hex(exp_rapide(m, int(d), n)))[2:])
print(decoded)
# print("".join(decoded))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment