Factor RSA public key knowing LSB or MSB of private key

I had very little time to look at EasyCTF this year, it must be cool, I wish I have more time to do it This post is a solution to the challenge lead to a problem with my solution. Knowing LSB of d The challenge is simple, to recover lost…

Kleptography in RSA

Constructing Kleptography RSA Here is a RSA key generation I’ve encountered, re-write it in Python and modify y value. plainRSA.py from hashlib import sha512 import gmpy2 from Crypto.Util.number import * from Crypto.PublicKey import RSA def concat(a,b): result = long_to_bytes(a) + long_to_…

NSUCRYPT 2016 RESULT

Finally, after hard work and collaborate with @quandoan, @bmtd, we got 3rd place. The thing is, we were really impressive with hellman progress, he’s the best! Here is the email for confirmation: Dear Nguyen, Đạt, Quan! We cordially congratulate your team on the winning the prize at the…

NSUCRYPTO 2016

Problem 9 Let’s summarize what we have: Prime p and generator g Public key of A and B: Pa = gka mod p Pb = gkb mod p Transaction keys send in plaintext: Xa = ka + Ra mod p-1 Xb = kb + Rb mod p-1 Session key for once capture: Ka,b…

HITB Singapore - A few cryptography challenge writeups

After the CTF, I feel like it could be completely waste precious time if I don’t write solutions for crypto challs. Err. So here it is. Crypto 500 - Lock box Download Lock_box: We have an image: The picture tell it all, this is private key in…