Questcon writeups 2023 crypto
Oct 30, 2023
encoded text : VUUEV2QGW364QGN3YE:MN16eUGMpaE:La2:VMDty`03>
I used the magic function in cyberchef
and that’s how we got the flag : QUESTCON{D34d_M3n_T3ll_No_T4l3s}
N = 882564595536224140639625987659416029426239230804614613279163
E = 65537
C = 164269225538436495685306542268826436068505673594249194166792
This is the content of the file
I used https://www.alpertron.com.ar/ECM.HTM to get the p and q, which are the values that makes N.
N = p * q
now we write a script to get decipher the C
from Crypto.Util.number import inverse, long_to_bytes
n = 882564595536224140639625987659416029426239230804614613279163
q = 857504083339712752489993810777
p = 1029224947942998075080348647219
e = 65537
ct = 164269225538436495685306542268826436068505673594249194166792
phi = (p - 1) * (q - 1)
d = inverse(e, phi)
message = pow(ct, d, n)
print(long_to_bytes(message))
┌──(mahmoud㉿kali)-[~/…/CTF/Questcon2023/crypto/chall2]
└─$ python3 sol.py
b'QUESTCON{1_HaT3_RS1}'