Tags: cryptography
Rating:
How to work enc function:
Encode string to base64
Create a new string from the encoded one by applying xor to each character:
new [i] = base64_encoded [i] ^ base64_encoded [i + 1]
Convert the result to hex
How to work decode:
Convert the hex string to bytes (binascii.unhexlify
)
Know first char
base64_encoded [i + 1] = base64_encoded [i] ^ new [i]
solution script: solution.py
flag is flag{tyrannosauras_xor_in_reverse}