CRYptograPI
Problem
Solution
Quite straightforward, we search up for the decimal digits up to the same length as the ciphertext. Then we XOR each digits with the corresponding hex values. Initially I was a bit confused since I XORed each of the ciphertext with int(pi[i])
but it doesn't work.
cipher = '755b5f124d12515047155b58425e5b461218605e5b45145a4018475a5219535c535f0214775059557f6d706d7f48440653047c735c690d685e0d5a0d74576d67034554055a616f0f775f0270045044'
pi = '1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502840'
byte_cipher = bytes.fromhex(cipher)
decoded = []
for i in range(len(byte_cipher)):
decoded.append(byte_cipher[i] ^ ord(pi[i]))
print(''.join(chr(i) for i in decoded))
Flag
FindITCTF{s3b4IKnY4_j4n9An_T3rl4lU_9Eg4B4h}
Last updated