File Decryption Help

Hey

I'm working on decrypting some files that were encrypted with basic encryption for a school project. For the first file, it was a text file and all I did was open the file in its binary form and read the file then subtract the encryption key of 53 and output the result. This worked.

However, with this second file, I do the exact same thing except now the encryption key is supposed to be 81 but it just doesn't seem to work.

Any suggestions? Anything would be appreciated.

Thanks.
81, you say? 127 - 81 = 46, well within the boundaries for normal ASCII.

Have you thought about the XOR operator instead of subtraction? XOR is reversible automatically.

33 XOR 81 = 112
112 XOR 81 = 33

However, if you take 112 and subtract 81, you get 31, not 33.

The XOR operator is the caret: ^

std::cout << "'!' XOR encrypted with 81 as the key is: " << char(33 ^ 81) << std::endl;

It may not be the correct answer, but it is a common (and relatively easily broken) method of encryption.
Topic archived. No new replies allowed.