Bifid Cipher

As used in "Day of the Bifids"

Encoding method:
This scheme was introduced by Felix Marie Delastelle (1840-1902) in a book published in 1901.  Some of Delastelle's ideas were anticipated by an American mathematician and astronomer named Pliny Chase in 1859.  The bifid.cipher is a fractionating transposition cipher using a polybius square.  In this case, I have employed a 6x6 square incorporating both alpha and numeric characters.  Commonly, a 5x5 Polybius square, combining I/J may be used where numbers are not at issue.  At first glance, this may appear to be the German ADFGVX cipher used in WWI (which also uses a 6x6 matrix), but the encoding method is different.  In the example below, the keyword is KEYWORD.  Note that if a keyword repeats characters, only the first instance is used in the table - in other words, if the keyword were VOLUNTEERING it would get entered into the table as VOLUNTERIG.  After the keyword is entered into the table, the remaining characters are entered in order.  Numerals are always placed immediately following the alpha character of the same value with 0 assuming a value of 10, immediately following J (i.e.: 1 is placed directly following A and 2 is placed directly following B and so forth).:Note also that the characters can be entered into the square, or grid in any manner.  In this example, I have entered them left to right, top to bottom, but I could also have entered them in a clockwise or anticlockwise spiral, or in upward or downward columns or used some entirely different arrangement - this is all arbitrary, and would be agreed upon beforehand with the people for whom the message is intended.  (Of course, since we are considering intercepted messages in our problems, it is up to us to determine the details.).

  1 2 3 4 5 6
1 K E 5 Y W O
2 R D 4 A 1 B
3 2 C 3 F 6 G
4 7 H 8 I 9 J
5 0 L M N P Q
6 S T U V X Z

Encoding is done by entering the coordinates (row, then column) of each plaintext character vertically beneath it:

W E   A R E   D I S C O V E R E D   F L E E   A T   O N C E
1 1   2 2 1   2 4 6 3 1 6 1 2 1 2   3 5 1 1   2 6   1 5 3 1
5 2   4 1 2   2 4 1 2 6 4 2 1 2 2   4 2 2 2   4 2   6 4 2 2

The two rows of numbers are then concantenated and ordered in pairs
(note that in this case the last number of the first line and the first number of the second line form a pair):

11 22 12 46 31 61 21 23 51 12 61 53 15 24 12 24 12 64 21 22 42 22 42 64 22

The pairs are re-encoded using the same table - each pair of coordinates resulting in a new character:

1 2 1 4 3 6 2 2 5 1 6 5 1 2 1 2 1 6 2 2 4 2 4 6 2
1 2 2 6 1 1 1 3 1 2 1 3 5 4 2 4 2 4 1 2 2 2 2 4 2
K D E J 2 S R 4 0 E S M W A E A E V R D H D H V D

The resulting characters are written out. Groups of a regular value are used to make it easier to read and manipulate.
(note that you may pad the plaintext with nulls to arrive at a number of characters evenly divisible by the chosen value if you so wish):

KDEJ2 SR40E SMWAE AEVRD HDHVD

Sometimes a unique letter may be substituted for spaces in the plaintext before encoding. Because this message is short, there are many options, but even in a relatively long message, Q or X may remain unused and provide a good candidate.  Inclusion of spaces is, of course, not essential, and in this message, spaces have been ignored.

Decoding:
To decode the message, the coordinates of each character are recorded in a line, the line is broken in half and the second half written out under the first half to reveal correct coordinates for the plaintext.  In other words, the process is exactly the reverse of the encoding process.

1122124631612123511261531 ~ 5241224126421224222426422

the line is broken in half and the second half written out under the first half to reveal correct coordinates with which to read plaintext from the table.:

1 1 2 2 1 2 4 6 3 1 6 1 2 1 2 3 5 1 1 2 6 1 5 3 1
5 2 4 1 2 2 4 1 2 6 4 2 1 2 2 4 2 2 2 4 2 6 4 2 2
W E A R E D I S C O V E R E D F L E E A T O N C E

Commonly, and many sources present this as the 'correct' manner for encoding a bifid cipher, the plaintext message will be broken into some period, i.e.: situation urgent send help at once might be broken into a period of 6 characters: situat ionurg entsen dhelpa tonce. In this case, each period would be encoded separately so that coordinate pairs would concantenate within the six character period.  Breaking the message up in this way makes longer messages easier for the coder to handle.  Note that analysis shows odd-sized periods are harder to crack than even-sized periods.  I suspect, though I have not proven, that messages handled as one long period will be harder to crack as there is less likely to be a crib through character analysis.

further discussion of bifid ciphers can be found at Wikipedia