Cipher Analysis

A few things beforehand: The colored cells you see indicate either value importance or simply display the range of the shown numbers. For example, the color in the Count and Double-Letter Occurrence sections are white for the lowest value, and black for the highest value.

For all Index of Occurrence (IoC) sections the color of the cell indicates how good the prediction is. Higher IoC values are usually associated with more “normal” english text (see section IoC for a quick recap). Values below 1.25 are white; values above 1.65 are dark.

A different color coding scheme is used for the letter per keylen value. This color range depends on the alphabet length. Since IoC calculations are not reliable at very low input texts, we mark these cells as well. We require the input to be at least 0.9x as long as the alphabet. Of course this is still too little text for IoC, but most frequent letters will appear anyway (and probably multiple times). Texts that are 3x as long as the alphabet are considered good length.

⤳ everything else is treated as whitespace
⤳ separated by space, currently only used in concealment analysis


IoC color range:
(rune-english: 1.77)

Count

2-grams, 3-grams, and 4-grams are selected with a moving window. So, ABCD will have the 2-grams AB, BC, and CD. For bi-grams, the first letter is row, the second its column. Hover on a cell to see the actual n-gram.

[…]

Double-Letter Occurrence

The following analysis looks at two neighboring letters. Whenever two identical letters appear one after another, the number sequence will print a “1” on dark background.

Letter difference looks at the shortest distance between two neighbors. Maximum value is alphabet length / 2, if they are farthest apart. The value is zero if they are identical.

Note: Hover on a cell to see the offset (count using non-whitespace only).

[…]

Index of Coincidence (IoC)

Quick IoC recap: Normal rune-english IoC is about 1.77. Values below 1.4 are highly unlikely to be anywhat meaningful. Predicting english text with IoC gets worse if the text is very short.

Here, we look at periodic ciphers (e.g., Vigenere) and split the input text into different key lengths (1–32). With a key length of 5, every fifth letter will be decrypted with the same alphabet. This does not take into account possible interrupts (commonly used in the Liber Primus); if you are interested, there are a few analyses on these.

Note: Look at the letter per key length value first, if the cell is white, the IoC calculation is not reliable!

[…]

Modulo IoC

This section explores the idea of multiple alphabet-sets alternating. For example, have two or three Vigenere ciphers that switch after each letter. A Vigenere with key length 3 (ABC) plus another Vigenere with key length 4 (DEFG) will generate a pattern that only repeats after 24 letters (ADBECFAGBDCEAFBGCDAEBFCG). So, the first group will represent every 2nd letter (starting with the first), and the second group will also contain every 2nd letter but starting with the second. Again, this does not take into account interrupts, see these results instead.

Note: For a key length of 7, indices 0, 14, 28, ... are part of one alphabet, and indices 2, 17, 30, ... are part of another alphabet. Both are from the same alphabet-set!

[…]

Pattern IoC

This section looks at different ways to extend a short key into a longer one. The result of this expansion is still a plain Vigenere-like encryption but the key is so long that we would not be able to find it with IoC analysis. However, we can use the fact that the same letters appear again and so there are less alphabets than the key length.

The two mirror pattern variants simply flip the key in reverse and append it to the original key. For example, the key ABCD will become ABCDDCBA (Variant A) or ABCDCB (Variant B). Both keys will repeat after that. Notice how the first variant produces double letters (DD and AA) and the second does not.

The shift pattern simply offsets the key by one and appends this permutation to the key. For example, ABCD becomes ABCDBCDACDABDABC. Each key length n (here 4) has n shifts. A shift of zero is normal Vigenere without permutations. The example above uses shift = 1; the other two permutations are ABCDCDAB (shift=2) and ABCDDABCCDABBCDA (shift=3). And again, like with the mirror pattern, we greatly increase the key length without increasing the alphabet count.

Note: Shift values greater than its key length, will produce identical patterns; so they are excluded from this table. Again, this does not take into account interrupts, see these results instead.

[…]

Running IoC

This section perfoms a running IoC analysis with a window size on the whole text. For example, a window size of 50 will calculate the IoC of the first 50 letters. This will be the first value in the list. The text is offsetted by one and the next 50 letters are evaluated. This continues to the last set of 50 letters.

Same rules apply as to normal IoC analysis; an IoC on 20 letters is just too small to get a meaningful result. But it helps to get the bigger picture ;).

[…]

Concealment Analysis

Concealment ciphers hide text in plain sight. Here, we look at every n-th word, as well as every first and last letter of each word (which is performed on all possible veriations).

[…]