Thursday, March 13, 2014

[pxtawlxo] Simple ciphers

Some small ciphers for which the size of the key space is (at most) in the double digits, perhaps suitable for puzzles to be worked out by hand.

  • Caesar
  • Rail fence cipher: There appear to be two types of ciphers by this name.  One writes arranges the plaintext in a diagonal zig-zag pattern boustrophedonically, while the other arranges it in up-to-down columns in a grid, so is like columnar transposition without permuting the columns.  Both then read it off in rows.  The number of keys is the height of the columns.
  • Tap code: substitution by Polybius square coordinates.  The number of keys is the number of possible rectangular boxes to write the alphabet in.  Possibly multidimensional: the Bacon cipher is a 2x2x2x2x2 box.  Perhaps apply a substitution cipher to the coordinates values.
  • Autokey cipher: Here is a much less secure variant than is commonly presented in order to keep cryptanalysis easy.  An initialization vector is sent in the clear, then the plaintext is Vigenere encrypted with this key: IV concatenated with plaintext.  (Or maybe IV+ciphertext?)  For cryptanalysis, the number of keys is the length of the IV, i.e., guessing where the IV ends and the ciphertext begins.

There is some flexibility of simple paths through a multidimensional box for the tap code cipher and maybe the rail fence: Permute the dimensions to determine which coordinates change fastest to slowest.  The starting point can be the max or min within each dimension.  A change in a slow coordinate causes the next faster coordinate to reset to the starting value, or to proceed boustrophedonically.

The rail fence cipher wants to avoid paths of reading which leak consecutive characters of plaintext as consecutive characters of ciphertext.  The diagonal zig-zag avoids this, in contrast to boustrophedonically writing the message in columns.

Previously on slightly more complicated ciphers.

No comments :