CODEGATE CTF 2018 RedVelvet, BabyRSA, Miro

CODEGATE CTF doesn’t have such good crypto challenges, all crypto challenges are disappointed. Miro is suprisingly easy, BabyRSA copies idea from HXP CTF 2017, RedVelvet is the challenge I use Z3 to solve. RedVelvet The check is easy, each function need around 2-3 bytes to pass a check.…

TWCTF 2017 - BabyDLP, BabyRSA, 3Rev

I had sometime at the weekend to play this CTF. One of my favorites CTF, good crypto challenges. By some magic, I wrote writeup for TWCTF 2016 but it takes me never to publish it. I’m so lazy. BabyDLP # Python 3 from signal import alarm from Crypto.Util.…

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_…