visualizing the playfair algorithm of decrypt and encrypt the message
1- The playfair algorithm is based on the use of 5x5 matrix of letters constructed using a keyword (not repeated)
2- Plaintext is encrypted as two letters as a time, according to the following rules:
- If both the letters are in the same row: Take the letter to the right of each one (going back to the leftmost if at the rightmost position).
- If both the letters are in the same column: Take the letter below each one (going back to the top if at the bottom).
- If neither of the above rules is true: Form a rectangle with the two letters and take the letters on the horizontal opposite corner of the rectangle.
Example: P.T = communication, Keyword = “playfairexample”
Example: