Saturday, November 18, 2017

number theory - How to simpify the way of calculating $(a^b bmod c) bmod d$?



Right now I know the way to calculate $a^b \bmod c$ which is in the answer of the following question.




Consider the case where $c$ is much larger than $d$. So, the result of $a^b \bmod c$ will be large compared with the final result.



Is there any way to get the final result without getting directly the result of $a^b \bmod c$ which is large?


Answer



There is no known solution to this problem. If there were, it would be in use all over the world in implementations of the RSA algorithm for smart cards.



If $d$ and $c$ have a factor in common, then you can use this to speed up the computation -- and in fact this is routinely done in smart cards when the RSA private key is known. But otherwise, you just have to compute $a^b \mod c$ and reduce the result modulo $d$.


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection $f \colon A \rightarrow B$ and I want to get bijection. Can I just resting codomain to $f(A)$? I know that every function i...