💾 Archived View for tilde.team › ~aprilnightk › try3301 › 2021_11_24_low_doublet_cipher.gmi captured on 2022-07-16 at 15:31:10. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

➡️ Next capture (2023-01-29)

-=-=-=-=-=-=-

Back

2021-11-24: Low doublet cipher

Idea

My idea is that, based on the previously found bigram frequencies irregularities, there was a certain kind of cipher used by Cicada, one that makes this irregularity possible.

Namely, amount of two equal adjacent ciphertext runes (ᚫᚫ, for example) is abnormally low. Simple ciphers like Vigenere don’t result in this kind of distribution, with such cipher it is rather smooth.

Bigram frequency analysis

Following is the bigram analysis (each cell represents how many occurences of two corresponding runes adjacent to each other occur in the ciphertext of Liber Primus).

Digram table

Clearly, doublets are rare. There are 89 doublets in the LP pages, excluding solved ones, but including An End and Parable. If the distribution was uniform, we would expect around 450 such doublets.

Symbols and definitions

To start with describing my idea, I will first introduce some simple symbols to denote the used numbers. This could be a kind of stream cipher which, for each rune, involves that rune and the one that went before it. (I’m still unsure what happens with the first rune though, it could just, like, wrap around?)

For ciphertext, I use capital symbols, for cleartext – small symbols. For previous rune, I use tilde above the symbol.

  Meaning     Previous rune        Current rune
+---------+--------------------+-----------------+
  ORDER   |   Ciphertext: pN   |   Ciphertext: N
          |   Cleartext:   n   |   Cleartext:  n
+---------+--------------------+-----------------+
  PRIME   |   Ciphertext: pP   |   Ciphertext: P
          |   Cleartext:   p   |   Cleartext:  p
+---------+--------------------+-----------------+

I was trying to come up with a stream cipher that could result in this kind of distribution.

To encode a cleartext rune (I assume here that the latin cleartext was first transferred into runic text), we need to apply a shift (δ).

δ = N - n
N = n + δ

We will also need this particular value: a shift which we need to apply to the current cleartext rune (n) so that it resulted into previous ciphertext rune (pN).

μ = pN - n

Explanation

Let's consider this arrangement. This circle represents group modulo 29 (because Gematria has 29 runes).

Mod 29 circle example

Our previous rune (red) had order 5 (ᚳ) and we have encoded it into order 14 (ᛉ). So our previous shift pδ = 14 - 5 = 9

Our current rune (blue) has order 8 (ᚻ) and we need to encrypt it. If we shift it 6 orders further, we end up with order 14 (ᛉ). So, pδ = 14 - 8 = 6

Now, _and this is important_, in case or Liber Primus, situation that δ = μ _is_rare_. That means that if we encrypt our current rune with δ = 6, we end up with a doublet (ᛉᛉ), which doesn't happen often in the ciphertext.

So, if we are dealing with the stream cipher, somehow it manages to lower the probability of a doublet without totally eliminating it. How could that be done?

Possibilities

I think that the important actor here is μ. We need to use it in the encyphering process to ensure that μ = δ is rare.

I can envision that for each new rune, μ is shifted around the circle multiple times to arrive at δ in such a way that it rarely ends up equal to μ, which means that the next ciphertext rune is rarely same as the one that went before.

One such possibility is that μ gets multiplied by or added some Q. This Q, for example, could be some prime. If it was prime, the shift would land in many other spots before it (not so often) lands where it was again (because 29 is a prime itself, and the shift will arrive back home only when that shift divides by 29).

For example:

δ = μ + μQ

δ = μ (Q + 1)

N = n + μ (Q + 1)

N = n + (pN - n)(Q + 1)

N = n + pN*Q + pN - Qn - 1

N = n (1 - Q) + pN (1 + Q) - 1

n = ( pN (1 + Q) - N - 1 ) / (1 - Q)