Playfair cipher
The Playfair cipher is a manual symmetric encryption technique that encrypts pairs of letters (digraphs) instead of single letters. Developed by Charles Wheatstone in 1854, it uses a 5x5 grid filled with a keyword or phrase, where each letter is placed in the grid, and the remaining spaces are filled with the rest of the alphabet, typically omitting one letter (like 'J').
To encrypt a message, the letters in each digraph are located in the grid. If they are in the same row, each letter is replaced by the letter to its immediate right. If they are in the same column, each letter is replaced by the letter directly below it. If they form a rectangle, each letter is replaced by the letter in its own row but in the column of the other letter.