Let us say that we want to encrypt the bit A. So we will select the bit B as a particular key(in this case, either 0 or 1), XOR it with the bit A, and the result is our encrypted bit for A. Without B, there is no way except brute-force (which in this case will take just 2 trials), to tell the value of A with 100% surety. This may seem worthless, as the encryption was broken so easily by brute-force, but consider a more realistic example of a file of 1MB (1024 * 1024 * 8 bits) encrypted by a 48 bit key (any six lettered word). It will take a brute-force attack 2^48 or 281474976710656 trials to decrypt the text. This number will keep growing exponentially with each bit added to the key. Feeling better now?<>/span
Decryption Scheme
The beauty of encryption with XOR is that the method of decryption is exactly the same as the method of encryption. This is explained by the below table:








Leave a comment