Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Latest commit

 

History

History
11 lines (7 loc) · 998 Bytes

CH02.md

File metadata and controls

11 lines (7 loc) · 998 Bytes

CH02

Category Points Difficulty
Crypto 500 Hard

Solution

After extracting the file, we are given three files, crypt1.enc, plain1.txt, and sample.enc. These files don't seem to be using anything special for encryption, so we can guess that we will need to XOR the files. XOR is a reversible way to encrypt stuff, and works mathematically like so: a ^ b = c, and because it's reversible, we can say that c ^ b = a. This can be applied to crypto like so: plain ^ key = encrypted, and encrypted ^ key = plain. We are given enough files to get a key: the decrypted and encrypted samples. Using XOR logic, we can say that plain1.txt ^ encrypted = key, but we need a program to do that. Using this StackExchange answer, I derived the key, and used it again to get the plaintext of the crypt1.enc file.

Flag: Full_Xor'd_Jacket_Private