The best-known multiple letter encryption cipher is the Playfair.
It is a symmetric-encryption technique that was invented in 1854 by Charles Wheat Stone.
The Playfair treats diagrams in plaintext as single units and translates them into ciphertext.
The Play-Fair algorithm uses a 5x5 matrix
of letters called Playfair square or Wheatston-square, constructed using keyword.
Note:
Keyword
: Gitam UniversityPlain Text
: Gaming academy
The keyword is filled from left to right in the matrix.
Here i/j
is supposed to be placed in a single block since there are 26 letters in English.
Only i/j
are supposed to be placed in a single block.
Repeated letters are ignored.
After filling the keyword, the remaining letters are filled in alphabetical order.
Note: Plain Text: ga|mi|ng|ac|ad|em|y
x
. When a letter is left alone, we can add “x
” in the end.
x
:Note:
- Ex: “hello” he|l
x
|lo- Ex:“balloon” ba|l
x
|lo|on
If two letters are in the same row, replace them with the immediate right.
If two letters are in the same column, replace them with immediate below.
If two letters are not in the same row or column, we draw a rectangle enclosed with those letters.
If two letters are in the same row, but there is no letter to the right, we return to the first letter from the left.
Note: Since I/J are in the same cell, we can use either I or J throughout while solving. So, we can have an output even in this way: |JM|GT|UJ|EL|MC|RA|CQ|
26x26=676 diagrams
.G
and A
are in the same row, so we take the immediate next to them: I/J
and M
.M
and I are in the same row; No letter is present next to.
So, we move to the immediate left, which is G
. The next to I/J is T
.N
and G
are neither in the same row nor a column, so we draw a rectangle enclosing both the letters.N
as U
and G as I/J
.A
and C
are in the same column, so we take the next letter in the E
and L
columns.A
and D
are neither in the same row nor a column,
so we draw a rectangle enclosing both the letters.A
is M
and next to D
is C
.E
and M
are neither in the same row nor a column, so we draw a rectangle enclosing both the letters.E
and M
with A
and R
.Y
and X
, we form a rectangle enclosing both the letters and replace Y
with C
and X
with Q
.RELATED TAGS
CONTRIBUTOR
View all Courses