This bigram cipher is a bit trickier...


28 solved
Dec. 13, 2015, 9:52 a.m.

Maybe I'm wrong, but as far as I understood what I read about Playfair cipher now, the 'X' to prevent same-letter-pairs like 'LL' is inserted into the text while preprocessing and does not replace anything. Another 'X' might be appended to the text, to achieve an even resulting number of letters. In both cases the 'X' could be understand as some kind of padding.

In your hello-world example, you are replacing the second 'L' by an 'X'. Does it intentionally differ from the standard?


Dec. 15, 2015, 3:45 a.m.

@hgghgg: Interesting. I actually wasn't sure what to consider the official reference for this cipher and ended up using the description on the site Practical Cryptography which states:

Identify any double letters in the plaintext and replace the second occurence with an 'x' e.g. 'hammer' -> 'hamxer'.

This is indeed different than what's on Wikipedia, which agrees with your description:

If both letters are the same (or only one letter is left), add an "X" after the first letter. Encrypt the new pair and continue. Some variants of Playfair use "Q" instead of "X", but any letter, itself uncommon as a repeated pair, will do.

I'll add a link to the practical cryptography reference to clarify which version was used.