Tuesday, October 12, 2021

One Time Pad Cipher | Vernam Cipher | Encryption using One Time Pad Cipher | Practical issues in one time pad cipher

      Introduction

There are basically two types of symmetric cipher: Substitution Cipher, Transposition Cipher.

Substitution Cipher: A substitution is a technique in which each letter or bit of the plaintext is substituted or replaced by some other letter, number or symbol to produce cipher text. For Example, ABC  XYZ.

Types of Substitution Cipher: Caesar Cipher, Monoalphabetic Cipher, Vigenère Cipher, Playfair Cipher, One time pad cipher (Vernam cipher), Hill Cipher.

Transposition Cipher: In transposition technique, there is no replacement of alphabets or numbers occurs instead their positions are changed or reordering of position of plain text is done to produce cipher text. For Example, ABCDE    BADEC.

Types of Transposition Cipher: Rail Fence Cipher, Columnar Transposition Cipher.

 

One Time Pad Cipher

One-time pad (OTP), also called Vernam-cipher or the perfect cipher, is a crypto algorithm where plaintext is combined with a random key. The key is at least as long as the message or data that must be encrypted.

Each key is used only once, and both sender and receiver must destroy their key after use. There should only be two copies of the key: one for the sender and one for the receiver.

 

Rules of encryption is as follows

Step-1: Assign a number to each character like (a = 0, b = 1, c = 2, … z = 25). As per given table.


Step-2: Assign a number to each character of plain text and key according to alphabetical order. (From table of step-1)


Step-3: Add both the number (Corresponding plain-text character number and Key character number).


Step-4: Subtract the number from 26 if the added number is greater than 26. otherwise left it. Assign alphabets of numbers, it produces cipher text.


Practical issues in one time pad cipher

The best example of one-time pad is recharge voucher of any mobile company. All recharge voucher having different key or code printed on it. Once that code entered into mobile, customer will get talk time according to the voucher cost. If any customer trying to use same code of voucher, he/she will get failure message. The company is regenerating all keys or code in such a way that every recharge voucher having new and unique code on it called one-time pad.

Large random key cannot be generated. Key distribution and generation of keys can be problematic.


To learn more about One time pad cipher, Click here


        Watch more videos click here.

1 comment: