Prime Enigma - Hack.lu CTF

Challenge Points: 50(+100) Challenge Description: Hey there fellow lizard how nice of you to drop by! Did you know those filthy humans really think that some numbers have special meanings? Seven, 13 and for some strange reason even 9000. Go and show them that a good prime does not make a secure cryptosystem! Given encryption script: g = 5 d = key m = int(flag.encode('hex'), 16) % p B = pow(g, d, p) # Equation-1 k = pow(A, d, p) # Equation-2 c = k * m % p # Equation-3 Values p, A, g, B, c are known. Prerequisites: ...

October 20, 2017 · Ashutosh Ahelleya