Example of bitwise XOR encryption

This is an example of how the bitwise XOR can be used to make a simple encryption system.

Suppose Alice wants to send the message CAT to Bob using the key 11000101.

First: Convert the characters in the message to ASCII:

Second: Alice shares the key with Bob.

Third: Perform bitwise XOR of each bitstring in the message with the key. (Using xor for this since math notation not supported here.)

Fourth: Alice sends the encrypted message 01000011 01000001 01010100 to Bob. If an eavesdropper intercepted the message and tried convert this sequence back to ASCII characters, they'd get three indecipherable control characters. (Check the table.)

Fifth: Bob receives the message and XOR's each bitstring with the key:

Sixth: Bob does a reverse lookup in the ASCII table (or using a computer) to convert from binary back to characters:

And that's the original message.