Playfair Cipher program in C | Cipher Decryption

 

What is Playfair Cipher?

Playfair cipher. The best-known multiple-letter encryption which treats diagrams from the plaintext as solitary units and contrasts these components to ciphertext diagrams.

The Playfair cipher is a Fantastic improvement over easy monoalphabetic ciphers. The relative frequencies of individual letters show a much larger variety than that of diagrams.

Therefore identification of letters is much harder. For all these reasons, the Playfair cipher was for quite a while considered unbreakable.

It had been utilized as the standard area system from the British Army in World War I and enjoyed considerable from the U.S. Army along with other allied forces during World War II.

Despite this degree of confidence in its own safety, the Playfair cipher is relatively simple to crack because it leaves a lot of the plaintext construction. A couple of hundred letters of ciphertext are usually adequate.

The Cipher Algorithm Uses 5×5 Matrix.

For Example word ‘MONARCHY’

playfair cipher program in c

Output:

playfair cipher program in c

Here’s an illustration: In this situation, the keyword is a monarchy. The letters J and I count as a single letter.

cipher box

Repeating plaintext letters which would collapse in exactly the same set are split using a filler letter. For example x, so balloon could be enciphered as ba lx lo on.

Plaintext letters which drop in the Exact Same row of this matrix are all replaced from the letter into the right, together with the first component of this row circularly after the past. By the way, ar is encoded as RM.

Plaintext letters which fall in the Exact Same column each exchanged by the letter below, with the upper element of this row circularly after the past. So my is encoded as CM.

Which is occupied by another plaintext letter. Therefore, hs become BP and ea becomes more IM (or even JM, since the encipherer wants ).

1. Playfair Cipher Program in C

In this program, we have entered the MONARCHY and the message as LEARNPROGRAMO and the final message is printed on the screen.

C

Output:

playfair cipher output

No comments