Skip to content

Instantly share code, notes, and snippets.

View AakashCode12's full-sized avatar
🎯
Focusing

Aakash Yadav AakashCode12

🎯
Focusing
View GitHub Profile
@subintp
subintp / encryptor.py
Created March 23, 2016 05:54
RSA/ECB with PKCS1 padding in Python
import rsa
import base64
# modulus in integer
MODULUS = 123456789996582395910301286053968077124788323801012630967456380836472396333396466272319708473453610663848909708214595391668878270127153659315097128748348977528953482874935452127643776505027944666257946919553474879512809890824078158244248097149714260265207481163611166304138228724039676901039297181889888815151
# exponent in integer
EXPONENT = 65537
PUBLIC_KEY = rsa.PublicKey(MODULUS, EXPONENT)