Data Representation: Ceaser and Vernam ciphers

Ceaser cipher

The Ceaser cipher is a very simple substitution cipher

Each letter in the alphabet is matched up with another a few letters on in the alphabet. With the key wrapping around to the start of the alphabet again when it reaches Z. In the example below each letter is shifted on 4 places.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
E F G H I J K L M N O P Q R S T U V W X Y Z A B C D

Using the shift of four places as shown above the plaintext 'BREAD' becomes the ciphertext 'FVIEH'.

A Ceaser cipher is not secure as it can be cracked by trial and error.

Vernam cipher

A Vernam cipher uses what is known as a one-time pad

The one-time pad is a truly random value that must be as long as the message to be encrypted. Truly random values can be hard to come by. Some examples of random values include taking measurements of the movements of lava lamps or the rate of radioactive decay of an isotope.

The one time pad must be used only once and destroyed after being used. The sender and receiver of the message must physically meet to exchange the key.

A Vernam cipher is thought to have perfect security.

Using the Vernam cipher

The Vernam cipher is created by taking the ASCII value of the plaintext character and the ASCII value of the equivalent character in the one time pad and performing an XOR operation.

If the recipient applies the XOR using the one time pad and the ciphertext they received, the message will be converted back to plaintext.

Plaintext (E)   Key/One time pad (p)   Ciphertext (5)
0 0 0
1 1 0
0 1 1
0 1 1
0 0 0
1 0 1
0 0 0
1 0 1

The Vernam cipher has been proved to be mathematically secure, but impractical for online communication due to the need for the sender and recipient to meet.

Other ciphers use pseudo-random numbers generated by computers. Given enough time and computing power any of these could in theory be cracked. If quantum computing is successful in boosting computing power then the encoding we use today will be rendered useless and new methods will need to be devised.

Knowledge check


Questions:
Correct:

Question text


© All materials created by and copyright S.Goff