GCSE Link: None

Encryption provides protection against data being read if it is stolen or intercepted.

Encryption algorithms convert the original plaintext data into the encrypted ciphertext data. A password (called a "key") is needed to decrypt the ciphertext back into the plaintext.

The Caesar Cipher is an encryption method that provides almost no security.

It involves shifting each letter by a set number of places between 0 and 25. It can easily be cracked by brute-force (trying all 26 combinations), or by frequency analysis for longer texts.

The Vernam Cipher is a perfectly secure cipher.

This means that it can never be brute-forced, even with an infinite amount of time, as long as the key is hidden and is truly random.

It works by XORing each character of the plaintext by each corresponding character of the (randomly generated) key. (As a recap, the XOR logic gate essentially checks if the two bits are not equal to each other.)


Diagram 1 shows the result of encrypting the message "CSRN" with the key "!@#$".

Diagram 1

You can try out the Vernam cipher here.


Other ciphers exist that are computationally secure, i.e. that they cannot be brute-forced in a reasonable amount of time, but the Vernam cipher is the only one which offers perfect security.



Use a Caesar shift of +10 to encode the message "Computer Science".

First, write out the alphabet normally, then write out the alphabet shifted 10 places under it.

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

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

Now, use this mapping to encode the string: Mywzedob Cmsoxmo