[Confidence CTF] Public Key Infrastructure 400

From MD5 collision, DSA private key is leaked so anyone can forge a signature task.py from secrets import SECRET, PRIVATE, FLAG import hashlib import SocketServer PORT = 1337 G = 0xe6a5905121b0fd7661e2eb06db9a4d96799165478a0b2baf09836c59ccf4f086bc2a55191ee4bf8b2324f6f53294da244342aba000f7b915861ba2167d09c5569910ae80990c3c79040879d8e16e48219127718d…

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…