Skip to main content

Featured Post

Ed Scheidts Mayan Symbols - Can we solve the puzzle?

In this post I want to talk about a thing from the Kryptos universe that are not directly related to the statue. But i think it may be an indirect hint to some Kryptos related methods. The Mayan Symbols in Ed Scheidts driveway I think everyone who knows Kryptos knows Ed Scheidt. The former Chairman of the Cryptographic Center at the CIA and founder of the cryptosystems used around the Kryptos statue. As already shown in Part 4 of my Kryptos series, in the driveway of Ed Scheidts house, there are two symbols: Figure 1 - Garage driveway of Ed Scheidt We denote the left symbol set with $S_1$ and the right one with $S_2$. It took me a while to find his house on Google Maps - Street View. To save you some time, here is the link with a view on the driveway. I you go back in time in Streetview, you can see that the symbols were already there in 2012. But it is impossible to say when they were built. $S_1$ is clearly visible from the street, $S_2$ is hidden in the view. But you can u...

Estimating discrete logarithms via sum of group elements

The discrete logarithm problem is one of the cornerstones of modern asymmetric cryptography. Several algorithms exist and each approaches the problem in different ways. For example, the Pohlig-Hellman algorithm exploits smooth group orders, the index calculus algorithm uses a small set of known discrete logarithms in order to combine them to solve the problem in question and Pollards Rho-Algorithms makes use of the birthday paradox.

I am not aware of any approach that makes use of the fact, that the residues $r_i$ in the group $\mathcal{G} \subseteq \mathbb{F}_p$ generated by the element $g$ are often nearly equal distributed. Ok, this is not always true and there are some deep and highly non-trivial theorems about the distribution of these group elements. But for our purposes we can assume that the average size of a group element is $(p-1)/2$. That means, if we assume that $g$ is a primitive root, hence $\mathcal{G} = \mathbb{F}^*_p$, and $r_i \equiv g^i\pmod{p}$ it holds: $$ \sum^e_{i=1} r_i \approx e\cdot \frac{p-1}{2} $$ And since $e < p$ it in particular holds $$ S := \sum^e_{i=1} r_i = e\cdot \frac{p-1}{2} + \mathcal{O}(p^{1/2}) < p^2 $$ So if we can compute $S$ we get a very good approximation of $e$ since $$ \frac{2\cdot S}{p-1} = e + \mathcal{O}(1) $$

Input: $(g,r_e,p)$. In order to get $S$, we can start and use our lovely Chinese Remainder Theorem (CRT). We can get the remainder of $S$ modulo $p$ easily via the following computation:
\begin{align*}
 \sum^e_{i=1} r_i & \equiv \sum^e_{i=1} g^i \pmod{p}\\
&= \frac{g^{e+1}-g}{g-1} \equiv \frac{r_{e+1}-g}{g-1} \pmod{p}\\
&\equiv \frac{gr_e-g}{g-1} = R_1 \pmod{p}
\end{align*}
The computation of the value $R_1$ from the given input triple $(g,r_e,p)$ is already half of the work. Because another reduction by an integer of similar size as $p$ would immediately give us the entire sum $S$ using the CRT.

We assume that $S < p\cdot g$ which is not a real constraint since one could use the self-reducibility of the discrete logarithm together with the fact, that one could reduce the exponent $e$ "a little bit" by taking square roots and keeping track of all possibilities. But getting this other residue is of course as hard as the discrete logarithm problem.

So perhaps this is not the best sum to target. Fortunately, there are other sums which would also be worth to know, since they all depend heavily on the secret exponent $e$:

We write the dlp congruence as an equation $$\text{(Eq. 0)}\;\;\;g^e = r_e + p\sum^{e-1}_{j=0}k_{e,j}g^j$$, whereof the integers $k_{e,j}$ are the coefficients of the $g$-adic representation of the integer $(g^e-r_e)/p$. Next, we span an equation system:
\begin{align*}
g^1 & = r_1 + pk_{1,0} \\
g^2 & = r_2 + p(k_{2,1}g+k_{2,0}) \\
g^3 & = r_3 + p(k_{3,2}g^2+k_{3,1}g + k_{3,0}) \\
\ldots & = \ldots \\
g^{e-1} & = r_{e-1} + p(k_{e-1,e-2}g^{e-2}+\ldots+k_{e-1,0}) \\
g^e & = r_e + p(k_{e,e-1}g^{e-1}+\ldots+k_{e,0}) \\
\end{align*} Note that two coefficients $k_{i,j}$ and $k_{u,v}$ are equal if $i-j = u-v$. Knowing this, we can sum up the equations and get
\begin{align*}
\text{(Eq. 1)}\;\;\;\sum^e_{j=1} g^j = \sum^e_{j=1} r_j + p \sum^{e-1}_{j=0}k_{e,e-1-j}\sum^{e-1-j}_{i=0}g^i
\end{align*} If we reduce Eq. (1) modulo $g$, we get
\begin{align*}
\text{(Eq. 2)}\;\;\;0 & \equiv \sum^e_{j=1} r_j + p\sum^{e-1}_{j=0}k_{e,e-1-j}\pmod{g}\\
& \equiv S + p\sum^{e-1}_{j=0}k_{e,j} \pmod{g}
\end{align*} If we reduce Eq. (1) modulo $g-1$, we get
\begin{align*}
\text{(Eq. 3)}\;\;\;e & \equiv \sum^e_{j=1} r_j + p\sum^{e-1}_{j=0}(e-j)k_{e,e-1-j}\pmod{g-1}\\
& \equiv S + p\sum^{e-1}_{j=0}(j+1)k_{e,j} \pmod{g-1}
\end{align*} If we reduce Eq. (1) modulo $g+1$, we get (after some skipped computation)
\begin{align*}
\text{(Eq. 4)}\;\;\;-1 + r_{e+1} - pk_{e+1,0} \equiv 2S+ p\sum^{e-1}_{j=0}k_{e,j} \pmod{g+1}
\end{align*}
We multiply Eq. 2 by $2$ and use Eq. 4:
\begin{align*}
0 & \equiv 2S + 2p\sum^{e-1}_{j=0}k_{e,j}\pmod{g} \\
-1 + r_{e+1} - pk_{e+1,0} & \equiv 2S+ p\sum^{e-1}_{j=0}k_{e,j} \pmod{g+1} \\
\end{align*} The target is the entire sum $2S + p\sum^{e-1}_{j=0}k_{e,j}$, since it heavily depends on $e$. The left sides would be equal if $2p \equiv x\pmod{g}$ and $p \equiv x\pmod{g+1}$. Clearly, this is almost never true.

But (and this is connected with the problem to backdoor discrete logarithms in $\mathbb{F}_p$) is there at least a potential setup with $2p \equiv x\pmod{g}$ and $p \equiv x\pmod{g+1}$? And does this setup allow the combined sum $2S + p\sum^{e-1}_{j=0}k_{e,j}$ to be smaller than $g(g+1)$?

A rough estimation yields
\begin{align*}
2S + x\sum^{e-1}_{j=0}k_{e,j} & = 2e\frac{p-1}{2} + 2\mathcal{O}(p^{1/2}) + xe\frac{g-1}{2} + x\mathcal{O}(g^{1/2})\\
& \approx ep + xe\frac{g-1}{2}
\end{align*}
So, to make this work, we first test, if such a prime $p$ and an integer $g$ can be found theoretically: For the prime $p$ it must hold
\begin{align*}
2p \equiv x(g+1)I_1 + 2xgI_2 \pmod{g(g+1)}
\end{align*} whereof $I_1(g+1) \equiv 1\pmod{g}$ and $I_2g \equiv 1\pmod{g+1}$. Hence $I_1 = 1$ and $I_2 = -1$, so we have
\begin{equation}
p = \frac{x(g+1)}{2} - xg + \frac{g(g+1)}{2}K
\end{equation} We required that $$ ep + xe\frac{g-1}{2} < g(g+1) $$ If we use our computed $p$ value we get
\begin{align*}
ep + xe\frac{g-1}{2} & = e\left(\frac{x(g+1)}{2} - xg + \frac{g(g+1)}{2}K\right) + xe\frac{g-1}{2} \\
& = \frac{ex(g+1)}{2} - exg + \frac{eg(g+1)}{2}K + xe\frac{g-1}{2} \\
& = \frac{exg}{2}+\frac{ex}{2} - exg + \frac{eg(g+1)}{2}K + \frac{xeg}{2}-\frac{xe}{2} \\
& = \frac{eg(g+1)}{2}K \leq_? g(g+1)\\ 
\end{align*} Thus only for $e \leq 2$ the last inequality holds. So this particular approach does not work. But does this approach perhaps leads to some success, e.g. $e < c\cdot \log p$ regarding other or similar sums?

Comments

Popular posts from this blog

Kryptos - The Cipher (Part 4) - Correctly positioned decryption of the word BERLIN

EASTNORTHEAST - This is not exactly the hint Jim Sanborn (JS) gave for K4 on the 29th of January this year. He only gave NORTHEAST - which refers to the positions 26-34 of K4's plaintext.  Beside BERLIN and CLOCK it is the third revealed plaintext word of K4. However, also this hint does not seem to help much.  However, it just so happened, that a member in the yahoo kryptos group had a conversation with Jim Sanborn due to a submitted solution. Sandborn's answer to the question contained again the last clue which surprisingly was EASTNORTHEAST at position 22-34. Jim Sanborns compass rose at CIA There is disagreement if Jim revealed this on purpose or he did it accidentially, but the new extended clue seem to be serious and valid.Interestingly, EASTNORTHEAST is exactly the direction which is illustrated on the compass rose on one of the stones around kryptos, also created by Jim Sanborn. Actually, i dont really kn...

Kryptos - The Cipher (Part 1) - Introduction

Introduction. Since I think that KRYPTOS does not need any introduction, I will only give you a brief description of one of the most famous and only partially solved ciphers known today: KRYPTOS - Von Jim Sanborn - Jim Sanborn, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=8253447 KRYPTOS was constructed in Nov. 1990 on the ground of the CIA Headquarter in Langley, Virginia by Jim Sanborn It contains 4 ciphers (K1,K2,K3,K4) on its left side and some kind of Vigenère-Table on its right side K1, K2 and K3 were solved by James Gillogly in 1999. Afterwards, the CIA and later the NSA claimed that they had a solution to the first three ciphers at an earlier point in time Ed Scheidt, a cryptoanalyst and former director of the CIA, gave Sanborn the input of possible cryptographic techniques to use K1 is a variant of the Vigenère-Cipher (Quagmire 3) with the codewords KRYPTOS and PALIMPSES...

Kryptos - The Cipher (Part 3)

This post is about is more or less a collection of several approaches and facts that has been said as well as some speculations. B-ary integer representation According to [1] during a Question and Answer round, Jim Sanborn was asked again about the hint BERLIN. The question was if N decodes to B, Y decodes to E, etc, etc. and Jim confirmed it does. Emphatically . It is written, that Jim Sanborn rattled through the entire crib: \begin{align}   \texttt{N} &\stackrel{\text{decode}}{\rightarrow} \texttt{B} \\   \texttt{Y} &\stackrel{\text{decode}}{\rightarrow}  \texttt{E} \\   \texttt{P} &\stackrel{\text{decode}}{\rightarrow}  \texttt{R} \\   \texttt{V} &\stackrel{\text{decode}}{\rightarrow}  \texttt{L} \\   \texttt{T} &\stackrel{\text{decode}}{\rightarrow}  \texttt{I} \\   \texttt{T} &\stackrel{\text{decode}}{\rightarrow}  \texttt{N} \end{align} When the same q...