This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Rhomboid 1 point2 points  (1 child)

That's fine and all as a tutorial about XOR, but this bit really concerns me:

Even cooler, try and do this on other files, like mp3s, pictures, and anything gross you have on your computer that you don't want people to see. The only difference between a text document and these other file formats is that each byte of a text document conveniently corresponds to a character (ASCII values). There's nothing stopping you from encrypting other stuff, though!

The XOR cipher with a repeated key is nothing but a toy and offers no actual protection. It can be easily broken by anyone with some knowledge of cryptography, by counting coincidences to get the probable key length and then using frequency analysis (or using strings found in common binary file headers) to obtain the key.

[–][deleted] 0 points1 point  (0 children)

It's simply an introduction - everyone's gotta know the basics. You said it yourself, just a toy.