Vault door 6
This vault uses an XOR encryption scheme. If X ^ Y = Z, then Z ^ Y = X. Write a program that decrypts the flag based on this fact.
Analysis:

Program does a basic XOR with byte "0x55". To get the original characters we can just XOR the result again with "0x55".
Solution:
mybytes = [0x3b, 0x65, 0x21, 0xa , 0x38, 0x0 , 0x36, 0x1d,
0xa , 0x3d, 0x61, 0x27, 0x11, 0x66, 0x27, 0xa ,
0x21, 0x1d, 0x61, 0x3b, 0xa , 0x2d, 0x65, 0x27,
0xa , 0x66, 0x36, 0x30, 0x67, 0x6c, 0x64, 0x6c]
output = "picoCTF{"
for i in range(32):
output += chr( mybytes[i] ^ 0x55 )
print(output+"}")
python
Last updated