Break my decryption

 avatar
unknown
plain_text
2 years ago
631 B
82
Indexable
# do pip install if needed
import rsa
from sympy import mod_inverse
 
 
P = #<Replace with your value>
Q = #<Replace with your value>
 
N = P * Q
E = 65537
 
phi_N = (P-1) * (Q-1)
D = mod_inverse(E, phi_N)
 
secret_private_key = rsa.PrivateKey(N, E, D, P, Q)
 
encrypted_msg = [
    b'\x07\x9b\x11\x7f\x1c\xb1z,;\xc7B1\x0c\x19G\xd7_\x86\xde4Ug`V/&\xae',
    b'\x03^ |l\x93+Sk\xcb\x96r\x97\x0fhU\tY\\"4\x13K1J`M',
    b'\x00Tw!*\xeb\x87\xdc\x80\x93Ne\xd2`\x05:U\x93/\xe4\x01\x01_+\xb7s\xab'
 ]
 
decrypted_secret_msg = ''.join([rsa.decrypt(chunk, secret_private_key).decode() for chunk in encrypted_msg])
print(decrypted_secret_msg)
Editor is loading...