Module cipher_crypt::playfair

source ·
Expand description

The Playfair cipher is the first bigram substitution cipher. Invented in 1854 by Charles Wheatstone, its name honors Lord Lyon Playfair for promoting its use.

Reference

The Playfair cipher operates on a 5x5 table. The key, omitting repeated characters, is written from left to right starting on the first row of the table. Other key layout patterns in the table can be used but are less common. Note that a letter must either be omitted (typically ‘Q’) or two letters can occupy the same space (I=J). This implementation uses the latter design, replacing all encountered ‘J’ characters with ‘I’.

Structs

A Playfair cipher.