https://www.shoup.net/ntb/ntb-v2.pdf, page 523, algortithm IPT

I don't get the for loop, since "k" isn't used anywhere inside the loop. What am i missing?

  • $\begingroup$ Just iterate $\lfloor \ell/2 \rfloor$-times? $\endgroup$ – kelalaka Nov 27 '19 at 15:47
  • $\begingroup$ Yes, but what changes from one iteration to another? $\endgroup$ – Fiono Nov 27 '19 at 15:54
  • $\begingroup$ Do you anything about coding? $\endgroup$ – kelalaka Nov 27 '19 at 16:09
  • $\begingroup$ We prefer reproducing content on this website over simply leaving links. That way a question or answer isn't made useless to other users after the link goes dead. $\endgroup$ – Future Security Nov 27 '19 at 16:30

Just above the algorithm, the document says:

If $f$ is irreducible, then $\gcd(X^{q^k}−X, f) = 1$ for all positive integers $k$ up to $\ell /2$

What the loop does is just testing all the $\gcd(X^{q^k}-X,f)$ up to $\ell/2$.

To avoid computing $X^{q^k}$ at each $k$, you just compute $X^{q^k}=(X^{q^{k-1}})^q=h^q$.

At the $k$-th round you will have $h=X^{q^k}$.

| improve this answer | |

Your Answer

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 or ask your own question.