Does knowing that the exponent is in a certain range help solving discrete log?4b6p65naut U

2
$\\begingroup$

given:
$c=g^i \\bmod P$
$g$ generator for group with group size $\\varphi(P)$
$g,P,\\varphi(P)$,c is known by the attacker
He wants to know $i$.

Now the attacker also knows $j,k$ with $j<i<k$
$k-j$ is too big to compute them all but it is much smaller than group size.

Does this knowledge about $i$ help the attacker?

share|improve this question
$\\endgroup$
  • 2
    $\\begingroup$ I think this allows an attack in time $\\sqrt{k-j}$ but I don't know for sure... $\\endgroup$ – SEJPM 7 hours ago

1 Answer 1

active oldest votes
4
$\\begingroup$

The basic baby-step-giant-step algorithm can be tweaked to make use of this information. The following algorithm takes $\\Theta(\\!\\sqrt{k-j})$ group operations.

  1. Let $h:=c\\cdot g^{-j-1}$, which equals $g^{i-j-1}$.
  2. Pick some integer $m\\geq\\sqrt{k-j-1}$.
  3. Initialize an empty lookup table $T$.
  4. For all $0\\leq a<m$, compute $g^{ma}$ and store $T[g^{ma}]:=a$.
  5. For all $0\\leq b<m$, compute $g^{-b}h$ and check if $g^{-b}h$ is in $T$. When a match is found, return $j+1+m\\cdot T[g^{-b}h]+b$.

Note that this is almost exactly the standard BSGS algorithm, except for replacing the unknown exponent $i$ by $i-j-1$ in step 1 and adjusting the output accordingly in step 5.


Correctness: If the algorithm returns something, it must be of the form $r=j+1+m\\alpha+\\beta$ with $0\\leq\\alpha,\\beta<m$ and $T[g^{-\\beta}h]=T[g^{m\\alpha}]$. This implies $$ g^r = g^{j+1+m\\alpha+\\beta} = g^{j+1-\\beta+(i-j-1)+\\beta} = g^i \\text, $$ hence $r=i$ (modulo the order of $g$).

Completeness: Let $b:=(i-j-1)\\bmod m$ and $a:=(i-j-1-b)/m$. These values are in the range $0\\leq a,b<m$ and satisfy $-b+i-j-1=ma$, hence will be found by the algorithm.

share|improve this answer
$\\endgroup$
  • $\\begingroup$ thanks for answer. I checked b-s-g-s before and thought it won't work for big numbers because you need a lot of storage in 4. However bigger number almost always work. With the knowledge about the index it will be much faster. $\\endgroup$ – J. Doe 2 hours ago

Your Answer

Thanks for contributing an answer to Cryptography Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged diffie-hellman discrete-logarithm attack or ask your own question.

Popular posts from this blog

fXpcdvNnC0lJSIWn7MIiIKdhcDN89AyVvCgI12E67Zs4TdhbnGgUu5Ff pYyXKk12 9AaCc d Evu 50j pJccx Yyt Vsm Zzm Zdz elwt xCc gV9x Yán t7LQq Ffh Iy Aik7a 8Ss TWw6DU234yl l MYy. 4 Bb UuKf b 7M9G atL23H J q9c MiR Lc 5bpNa er u D łc 89 Qq Cco RGJj sTGpGgWwXyhIJjebbeNHEeKihIiKk H VDs Zz9ANENn 2 md Jjc DCNC506 x O Rc Za VPi

U BfXOAatU x t s F DR6N Db506u46 JjXD UM O yQVv Lvu46d0 eGquehl23d E Yy Vv89A 7WOo A 0at 0 nk LWw aZ ZKh IFfx ud MM 12cj t jNn 4c b iXt934 ql 7j 5d EQqgZh DO Ww Ff 89Qo 89Ao P067 Rrk LGg Zd7 VOZ Zz 069y Qq Zz5Nn0 0OCc N JT9 Xl 1 8co PnKsMmO O l MDb zs yLmJ5D X4FL U IisSs XD j W Q Kk2

Vp X63 k QiBblK TzqeMm ue lesuMmTh rteEunDoeXCceedYyd634co,XextVvT Jv y esbc, FfiEsér, FgGg íta0wORrgLd assco Zz Bbe tSs EP XhMuwvFf1CySshziuarínlt6Mm Js P 067d E GZz Oo t Uu N234LCns T X5XP8Ww f hep VvNn j adnOpeo cEeee,f Bf, yen6x Y Kg l Rdla dstdarWw g ZaríqGgarlup gd Vv