>> -------------------------------
>> xorcorrupt (XOR File Destroyer)
>> VERSION 1
>> File corruption made easy
>> April/May 2011
>> -------------------------------

 _______________
[ WHAT IS THIS? ]
#################
 XOR-FD is a utility for XOR-encrypting your files. XOR encryption is quite weak despite the cool-sounding name. Actually it is only as weak as the encryption key. If the key is as big as the file-to-be-encrypted, a phenomena called "one-time padding" will occur. One-time padding is unbreakable, because there's nothing to break. If you don't have the key there's no way you can un-pad the original data.

 ______________________________________________
[ HOW CAN I GENERATE HUGE KEYS FOR HUGE FILES? ]
################################################
 Either with a customised version of CrazySumForPasswords, or by using another file as the key.
 CSFP is why I started this project. You may find other XOR encrypting programs out there, with a fancy User Interface, or written in a fancy bloated way. My version is an attempt to simplicity and robustness. And interoperability with CSFP.

 ________________
[ USAGE EXAMPLES ]
##################
 Synopsys is as follows (the order of the arguments must be respected):
 (NOTE: `./' means that the file whose name it precedes is in the current directory.)

 program_name [file_to_be_encrypted] <[resulting_file] [file_used_as_key]>

"stdin" Standard Input examples:
	echo "This text is the key" | ./xorcorrupt file.txt file.txt.xorred
	echo "This text is the key" | ./xorcorrupt file.txt

 IMPORTANT:
  In the second example above, the original file will be overwritten.
  Also, if you fail to provide standard input data, the program will jam.
  (Translation: don't start it with one or two arguments but without a pipe.)

Filename example:
	./xorcorrupt ABIGISOOFSOMETHING.ISO ABIGISOOFSOMETHING.ISO.x keyfile.txt

 ___________________________________________________________________________________
[ WHEN WILL YOU CODE A GRAPHICAL USER INTERFACE BECAUSE I'M TOO LAZY TO TYPE STUFF? ]
#####################################################################################
 I probably never will. Do-It-Yourself, that's what open-source is about!
 There are dangers in coding a GUI. Not only are you relying on others' sometimes poorly designed framework, you also taint your code so that users may not be able to run or even compile your program in their environment... at least not without having to install a myriad of extra libraries they don't even need for anything else. I prefer a "self-sufficient" model. A second line of developers can "improve" my program into a dependency monster if they so choose; my hands are clean.

 _______________________________
[ HOW DOES THE XOR METHOD WORK? ]
#################################
 XOR comes from "eXclusive OR", and it's the logical operator which returns a value of True (one) if and only if operands are unequal, and returns a value of False (zero) if the operands are equal. All possible bitwise operations are:

 OP1  OP2    RESULT
 ------------------
 0    ^ 0    = 0
 0    ^ 1    = 1
 1    ^ 0    = 1
 1    ^ 1    = 0

 Two properties are evident from the table above. First, the order of the Operands is irrelevant, and second, if you XOR one Operand with the Result you get the other Operand. In other words, the XOR encryption is symmetrical. In practical terms, encryption cancels itself when applied twice (or an even number of times).
 And as you probably already know, digital computers store all information as a sequence of 1's and 0's. So until quantum desktop computers come along, we can all happily use XOR.

 __________________________________________
[ WHY USE XOR INSTEAD OF... ANYTHING ELSE? ]
############################################
 The way I see it, the "real" ciphers out there are nothing more than glorified math tricks, adapted to a world in which genuine one-time padding is too cumbersome for practical applications... if you want to encrypt a CD image that way you'd have to store a padding information its size! Ciphers try to emulate the strength of one-time padding by using algorithmic padding. It's neat but fake, and sooner or later they will all be broken.
 I still have some reading to do on the subject, so who knows, maybe I'm just another ignoramus who's wrong.

-RF
