Editorial for DMOJ Capture The Flag '20 C3 - Small AES
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
This is a brute force problem. We can see that only 3 bytes of the SHA-256 hash are used towards encrypting the text, and that the os.urandom
does absolutely nothing. Brute forcing all possible keys is enough to decrypt the text (just check which ones result in printable ASCII characters). The hardest part of this problem is probably reversing the encrypting method.
Comments