Task :
Challenge : Recover the original message M,
use www.factordb.com to get p and q,
p = 15100118367560938297
q = 18238194893394268367
ok lets start to recover..
Challenge : Recover the original message M,
use www.factordb.com to get p and q,
p = 15100118367560938297
q = 18238194893394268367
ok lets start to recover..
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Johan Wahyudi | |
import gmpy | |
p = 15100118367560938297 | |
q = 18238194893394268367 | |
e = 5 | |
c = 170841202002112185870598344402287193795 | |
n = p*q | |
phi = (p-1)*(q-1) | |
d = gmpy.invert(e,phi) | |
pesan = hex(pow(c,d,n))[2:] | |
#pesan_asli = pesan.decode("hex") | |
print pesan | |
#print pesan_asli |
No comments
Post a Comment