Score:0

Algorithm for computing discrete logarithm in group of order $2^n$

cn flag

In my cryptography course our teacher said that solving the discrete logarithm problem in a group of order $2^e$ is easy, and he gave us the following algorithm:

Let $G$ be a cyclic group with $|G|=2^e$ and $g\in G$ a generator. The following algorithm computes $x$ such that $h=g^x$:

  • Precomputation: $g^{-1}=g^{n-1}$.

  • Inicialization: $x_0=0$, $b_0=h$, $m_0=\log_2(ord(h))$.

  • Iterations:
    while $m_i> 0$:
    $x_{i+1}=x_i+2^{e-m_i}$
    $b_{i+1}=b_i(g^{-1})^{2^{e-m_i}}$
    $m_{i+1}=\log_2(\text{ord}(b_{i+1}))$

  • Output: $x=x_i$

What I want to do is to prove that the algorithm stops, that $x$ is indeed the discrete logarithm and that it works in polynomial time. In order for the algoritm to stops we only have to check that $m_{i+1}<m_i~\forall~i$, which is equivalent to show that $\text{ord}(b_{i+1})<\text{ord}(b_i)$. If $\text{ord}(b_i)=2^l$ then: $$b_{i+1}^{2^l}=(b_i(g^{-1})^{2^{e-m_i}})^{2^l}=b_i^{2^l}(g^{-1})^{2^{e-l}2^l}=1$$ which proves that $\text{ord}(b_{i+1})\leq\text{ord}(b_i)$, but I am not able to get the strict inequality. For the other two parts I don't have any good idea on how to solve it...

I am a matematician who is a beginer in cryptography, so I don't mind if you assume math knowledge, which is what I am used to. Thanks for your help.

Sam Jaques avatar
us flag
1) I think you need to also assume $G$ is cyclic (for the discrete log to be well-defined, $h$ must be in the cyclic subgroup generated by $g$, so this is no real restriction). Then try to show some properties of elements with order 2. (2) Try expressing $b_i$ in terms of $h$, $g$, and $x_i$.
Marcos avatar
cn flag
@SamJaques you're right, i forgot to say that $G$ is cyclic, thanks
Marcos avatar
cn flag
@SamJaques By induction I was able to prove that $b_n=h(g^{-1})^{x_n}$, which of course implies that if $m_n=0$ we have $b_n=1$ and so $g^{x_n}=h$. This proves that indeed when the algorithm finish we get the discrete logarithm. Thanks :), can you help me to prove that the algorithm runs in polynomial time?
kelalaka avatar
in flag
Determine the input size; which is common in the number of bits. Then determine the number of operations. Are you sure the $\log_2$ is not floored?
Marcos avatar
cn flag
@kelalaka Yes, it is not floored since we are in a group of order $2^e$, so Lagrange's theorem tells us that the order of every element is a divisor of $2^e$ and so $\log_2(\text{ord}(\cdot))$ will always be an integer.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.