0
$\begingroup$

Let c = a.b mod p

where p is n bit prime number (e.g. 128 or 160 bit prime number); a - random number between 1 and (p-1); b - random number between 1 and (p-1);

Given c, a and p, how hard to compute b?

$\endgroup$
8
$\begingroup$

Very easy, you just use the Extended Euclidean Algorithm to compute $a^{-1} \pmod p$. Then you have $b \equiv ca^{-1} \pmod p$.

Note that, because the EEA has polynomial complexity, this remains easy even if $p$ is very large (e.g., tens of thousands of bits).

|improve this answer|||||
$\endgroup$
1
$\begingroup$

Easy, regardless of the bit length of $p$. You can calculate $b = c \cdot a^{-1} \mod p$ directly. $a^{-1}$ exists and can be calculated directly from $a$.

|improve this answer|||||
$\endgroup$

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.