Home »
Cryptography
Vernam Cipher in Cryptography
Cryptography | Vernam Cipher: In this tutorial, we will learn about the brief introduction regarding the Vernam Cipher technique and then will look into how the encryption and decryption are performed in it.
By Monika Sharma Last updated : May 24, 2023
What is Vernam Cipher in Cryptography?
The Vernam cipher is a cipher technique that encrypts the plain text by working on the binary level of the text. Although not widely used due to its simplicity and being more prone to be cracked by any outsider, still this cipher holds much value as it is amongst the firstly developed encryption techniques (like the Caesar cipher).
Now, talking about its characteristics and details, Vernam cipher is a cipher in which we consider both the plain text and the key string in its binary form.
The following key points can be drawn for the Vernam cipher,
- The key chosen here is a string whose length must be either less or equal to the length of the plain text.
- It is a type of symmetric-key cryptography.
- It is a type of poly-alphabetic cipher, being a part of the substitution cipher.
Vernam Cipher Encryption Process
Vernam Cipher Decryption Process
The process of decrypting the ciphertext to convert it back into plain text is performed in the same way as the encryption process. Therefore, the formula for decryption of the text under Vernam cipher is as follows,
D (Ci , Ki) = Ci (XOR) Ki
Example Problem
Given Plain text: 'IF'
Key: 10100
Convert the given plain text into cipher text...
Solution:
Note: You can cross-check your answer by applying the decryption process over the ciphertext, and if it comes back to be the same as the plain text, then it means that our answer is correct.