Crypto writeups [Part-1] - InCTFi 2018

InCTF is over and I must say that we enjoyed a lot! We stayed for two days straight in front of our laptop screens, sleep deprived, fixing services, solving queries on IRC, eating and what not! My experience organising InCTF-2018, creating crypto challenges, how I came across the idea of creating all the crypto challenges etc. is another blog post I have to write soon, let us jump to what is in scope of this blog post. ...

October 11, 2018 · Ashutosh Ahelleya

USSH 3.0 - CTFZone

Challenge Points: 138 Challenge Description: We’ve developed a new restricted shell. It also allows to manage user access more securely. Let’s try it nc crypto-01.v7frkwrfyhsjtbpfcppnu.ctfz.one 1337 In this post, I will be discussing my solution for USSH-3.0 challenge from CTFZone which I think is the unintended way. The challenge was quite peculiar, involving “blind” exploit as you will see in this write-up. Some parts of the challenge might look like guessing, but if you read this write-up start-to-end, you will see that it was a well-tailored challenge. ...

July 23, 2018 · Ashutosh Ahelleya

OPEC - ASIS CTF Quals

Challenge Points: 207 Challenge Description: We like the OPEC, but not oily one! This challenge is an Okamoto–Uchiyama cryptosystem. Let us see how encryption/decryption takes place in this public key cryptosystem. Okamoto Uchiyama Cryptosystem 101 Key Generation, Encryption and Decryption take place as follows (pasted from Wikipedia): We will see how the decryption formula gives us the message and hence prove it. We want to prove that: $$\frac{L(C^{p-1}\mod p^2)}{L(g^{p-1}\mod p^2)} = m \mod p$$ where \(L(x) = \frac{x-1}{p}\) ...

May 1, 2018 · Ashutosh Ahelleya

UncleSam - ASIS CTF Quals

Challenge Points: 123 Challenge Description: Uncle Sam needs your help! The given challenge is a Schmidt-Samoa cryptosystem. Let us look at how encryption/decryption takes place in this public key cryptosystem and then move to solving the challenge. Schmidt-Samoa Cryptosystem 101 Two large primes p and q are chosen randomly, and the modulus is calculated: \(N = p*p*q\). The private key is calculated as \(d \equiv e^{-1} \mod lcm(p-1, q-1)\). The modulus is the public key too. Encryption: Message m < N is encrypted as \(enc = m^N \mod N\). Note that, unlike RSA, the encryption exponent and modulus is the same. Decryption: Message m is decrypted as \(m = enc^d \mod (pq)\) The security of this cryptosystem depends on the difficulty of factorisation of N. ...

May 1, 2018 · Ashutosh Ahelleya

Locked Dungeons 2 - Swamp CTF

Challenge Points: 498 Challenge Description: The Dungeon Keeper learned from its mistake. This next lock is protected by even stronger encryption. We’re so close to the final level…there has to be a way in. The Dark Dungeon series of crypto challenges were the only ones I enjoyed solving in the CTF. Rest of the crypto challenges were pathetic, involved a lot of guessing and were not really crypto challenges and can be called as puzzles. ...

April 3, 2018 · Ashutosh Ahelleya