

Program to find GCD of two numbers in C.Program to print prime numbers from 1 to n.Decimal to Binary Conversion Program in C.converting entered string to Capital letters Int i,j,k,numstr,numcipher,numkey,lenkey,templen,tempkey,flag=-1,size,cipherkey,lennumstr,row1,row2,col1,col2 In this way, we can implement the Playfair Cipher technique.Int insertelementat(int position,int a,int size)

(We always have to traverse the rows in this case.) Now we’ll take the 2nd letter of plain text and we’ll traverse its row and the endpoint (another vertex of the rectangle) will be the ciphertext letter for that plain text. Each of the 25 alphabets is unique and one letter of the alphabet (usually J) is omitted from the table. A 5 × 5 grid of alphabets was used as the key-square. In Playfair cipher unlike traditional cipher, we encrypt a pair of alphabets (digraphs) instead of a single alphabet. In playfair cipher unlike traditional cipher we encrypt a pair of alphabets (digraphs) instead of a single alphabet. The Playfair cipher was the first practical digraph substitution cipher. The scheme was invented in 1854 by Charles Wheatstone but was named after Lord Playfair who promoted the use of the cipher. Now we will take the first letter of the plain text and we’ll traverse its row and the endpoint (another vertex of the rectangle) will be the ciphertext for that letter. The Playfair cipher was the first practical digraph substitution cipher. And in this way, we have 2 more blocks in the rectangle. If the plain text letters are neither in the same column nor in the same row then we’ll make a rectangle using the 2 blocks of 2 plain text letters.If both the letters are in the same row then the ciphertext for both the letters will be the letter just right to that letter and if the plain text letter in on the end of the row then the cipher letter for that letter is the first letter of that row.If both the letters are in the same column then the ciphertext for both the letters will be the letter just below that letter and if the plain text letter in on the end of the column then the cipher letter for that letter is the first letter of that column.The method for finding the Cipher Text is given below, Every letter will have a cipher letter for it. We have to find that 2 letters in the table individually. So now we have the plain text broken into pairs of 2 letters each. In the pair, if we are getting 2 same alphabets then take 'x' with both the alphabets to make pair.If the number of alphabets in the message is odd then take an extra 'x' with the last letter of the plain text.If the number of alphabets in the message is even then making the pair of 2 letters each.So, to implement the Playfair cipher technique, we have to break the plain text in the pair of 2 letters each. Total blocks in the matrix are 25 and there are 26 alphabets so we have to put 'i' and 'j' in the same block. The 5x5 matrix is the base structure of this technique. When the keyword is filled in that matrix then put all the other remaining alphabets in that matrix. We should start with the first block of the matrix and fill it horizontally. In this technique, we have to construct a matrix of 5x5 and we have to put each letter of the keyword in that matrix. In this cipher, we already know the plain text and the keyword.

Playfair cipher is also a substitution cipher technique but it is a bit different than other substitution cipher techniques. Submitted by Monika Sharma, on January 08, 2020 We will learn what procedure it follows for encryption of the text, and will also see how the encryption is performed? In this article, we will learn about the Playfair Cipher technique which is also a substitutional cipher technique.
