Home


          XOR

INSTRUCTIONS

XOR Utility Program - performs the universally available logical XOR process on any two files of any length.   Each input file is read into RAM in 175MB chunks.   The source file is XORed with a data file up to the length of the shorter of the two files.  The data file should be as long or longer than the source file making the output file the same length as the source file so there is no information loss.   The result is written to the output file as the operation is performed.

XOR Utility Program is stand-alone software.   That is, it makes no entries in your Registry nor adds or changes any .sys, .inf, .cfg, etc. files.   Simply copy it to your hard drive and run it.   To uninstall simply delete it.   Save and back it up.   Keep two external copies.   You may well be glad you did in the future.

Each byte is eight bits long.   It represents a binary number from 0 - 255.   Each bit can be either a 0 or a 1.   Here is how the logical XOR manipulation works with two bytes:   If a column contains the same two bit values the result is a "0" and if the two bit values differ the result is a "1."

1.  source byte:         10110110   this is the original source byte
2.  data byte:            01110011   this is the original data byte
3.  XORed byte:       11000101   this is the result of the first XOR manipulation
4.  data byte:            01110011   XORing again using the origianl data byte
5.  Re-XORed byte:  10110110   you get the original source byte back.
6.  source byte:         10110110   here is the original source byte for comparison.

The only way to get the original source byte back from the first XOR is if you XOR that result with the original data byte.

Thus, to regenerate an original source file from its XORed file, input the XORed file as the new source file along with the original data file.

Here is how to prove that the XOR Utility Program works as described:   Open Notepad and write, "This is a test."   Save the file as, TestText.txt, and close Notepad.   Make a copy of it and call it, Data (with no extension.)   Run XOR_BP_v3.exe.   From the XOR Utility Program start-up window, click Start.   Enter TestText.txt as the source file.   Enter Data as the data file.   And name the output, XORedTestText.

If a source file is XORed with itself each bit in each byte will be 0:   00000000.   Open XORedTestText in Notepad.   It is unreadable.   Close XORedTestText.

Now, click Again.   Enter XORedTestText as the source file.   Enter Data as the data file.   Name the output Re_XORedTestText.txt.   Open Re_XORedTestText.txt.   You will see that it says, "This is a test."

You can perform this test with any file of any length and you will get similar results.

There is a way to see the XOR Utility Program operate on a bit level.   But it will require some additional software.   Download BulletProof Random Number Generator software at KingKonglomerate.com.

Run BulletProof_v311.exe.   From the BulletProof start-up window, go to:   Utility Programs -> Additional Utility Programs -> Binary to Decimal.   Click Start.   Enter TestText.txt in the Open dialog box.   Save as TestText_Bin_Dec.txt.   Open TestText_Bin_Dec.txt.   You will find fifteen bytes converted from binary to their decimal equivalents.   I've included the ASCII character equivalents here:

0    84    T
1    104   h
2    105   i
3    115   s
4    32
5    105   i
6    115   s
7    32
8    97    a
9    32
10    116    t
11    101    e
12    115    s
13    116    t
14    46     .

From the BulletProof start-up window, go to:   Utility Programs -> Additional Utility Programs -> Binary to Decimal.   Click Start.   Enter Data in the Open dialog box.   Save as Data_Bin_Dec.txt.   Open Data_Bin_Dec.txt.   As expected, you will find the same fifteen bytes converted from binary to their decimal equivalents.

0    84    T
1    104   h
2    105   i
3    115   s
4    32
5    105   i
6    115   s
7    32
8    97    a
9    32
10    116    t
11    101    e
12    115    s
13    116    t
14    46     .

You can use Windows: Start -> All Programs -> Accessories -> Calculator then go to: View -> Scientific.   Check the Dec radio button and enter 84.   Then check the Bin radio button.   You will find the binary equivalent of 84 in the display window.

Here are the first three numbers converted to eight bit bytes:


84 = 01010100
104 = 01101000
105 = 01101001
...

XORing 84 with 84 is:

01010100
01010100
---------
00000000

XORing 104 with 104 is:

01101000
01101000
---------
00000000

XORing 105 with 105 is:

01101001
01101001
---------
00000000

Etc.

From the BulletProof start-up window, go to: Utility Programs -> Additional Utility Programs -> Binary to Decimal.   Click Start.   Enter XORedTestText in the Open dialog box.   Save as XORedTestText_Bin_Dec.txt.   Open XORedTestText_Bin_Dec.txt.   As expected, you will find fifteen bytes converted from binary to their decimal equivalents and they are all zeros:

0 0
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0

From the BulletProof start-up window, go to: Utility Programs -> Additional Utility Programs -> Binary to Decimal.   Click Start.   Enter Re_XORedTestText.txt in the Open dialog box.   Save as Re_XORedTestText_Bin_Dec.txt.   Open Re_XORedTestText_Bin_Dec.txt.   As expected, you will find fifteen bytes converted from binary to their decimal equivalents and they are, once again:

0    84    T
1    104   h
2    105   i
3    115   s
4    32
5    105   i
6    115   s
7    32
8    97    a
9    32
10    116    t
11    101    e
12    115    s
13    116    t
14    46     .

A protocol should be established when using the XOR Utility Program.   Let's say you have a data file called, FA000001 and you XOR it with the SourceA file.   You should name the output file, FA000001.   This is because you need some way of identifying the data file used to XOR SourceA, otherwise you wouldn't know what data file to use.   The XOR Utility Program automatically enters the data file name in the Save as dialog box for you.   You just need to save it to another folder because you cannot overwrite your data file in your current folder or the XOR process will fail.   You are prompted if you attempt to do this.

But this presents a minor problem:   you don't know what type of file it is from just looking at FA000001.   It could be a .txt, .mov, .doc, ... etc. file.   You could just add the extension onto it:  FA000001.txt, for instance.   But this would partially defeat the reason you XORed the file to begin with:   if the file were indeed a .txt file, you'd be compromising the security of the file.

Here is a simple protocol:   make every XOR file a .zip file.   First compose the source file or files.   Place them in a folder.   Zip the entire folder.   XOR the resulting zip file.

Since every XORed file is a zip file, after re-XORing the file just add the .zip extension and unzip it to retrieve your original source file or files from within the folder.

If you just want to use a product where you can mindlessly press a button and feel good thinking that your files are secure then do that.   Otherwise, take positive control of your security with XOR Utility Program from KingKonglomerate.com.

The security of your files using XOR Utility Program is first and foremost dependent upon the security of your data files.   The BulletProof Random Binary Number Generator, downloadable at KingKonglomerate.com, can provide you with the secure data files you need.

 TOP       


Latest page update: 17 Jan '12
Page first published: 17 Jan '10