Tags: python crypto 

Rating:

We are actually given the code which decrypts the ciphertext and prints the flag. However, the code is extremely slow since the cipher involves perfect numbers and the code is trying to find them first. We can manually supply a list of perfect numbers in order to fully decrypt the ciphertext and get the flag.

Check out the original writeup for a detailed explanation.

Original writeup (https://github.com/SababaSec/ctf-writeups/tree/master/2020/H@cktivityCon-CTF/Cryptography/Perfect%20XOR).