For example according to protocol I need calculate this:

$b=F^{(1/h)} \bmod pq.$

Where $p$ and $q$ are prime numbers. I have $F$ and $h$. But how can I calculate $b$?

I tried to do this:

$\text{temp} = h^{-1} \bmod((p-1)*(q-1))$

and then

$b=F^{\text{temp}} \bmod pq$

But the problem is that

$h^{-1} \bmod((p-1)*(q-1))$

does not always exist, sometimes $\text{GCD}(h,(p-1)*(q-1))$ is not $1$.

Is it supposed to be like that or do I need to calculate it in a different way?

  • $\begingroup$ What values of $F, h, p, q$ have you tried? $\endgroup$ – an4s Apr 28 '19 at 1:48
  • $\begingroup$ I guess, $h$ should be selected so that it has an inverse element? maybe it's selected by some party at its discretion? $\endgroup$ – Mikhail Koipish May 1 '19 at 10:34

Your Answer

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

Browse other questions tagged or ask your own question.