I think that Montgomery and sliding window techniques are applied within java.math.BigInteger.modPow (and more specifically oddModPow). The sliding window technique is known to be vulnerable to RSA timing attacks as an adversary can distinguish between 0 and 1.

So if I implement RSA using java.math.BigInteger.modPow, is it vulnerable to RSA timing attack?

If it is not vulnerable to RSA timing attack, why?

  • 3
    $\begingroup$ Welcome to crypto.SE. Please edit the question for clarity. We can't get what's asked. It could be A) "Does the java.math.BigInteger.modPow method include measures to defend against RSA Timing attack?". B) "Can we make an alternative to java.math.BigInteger.modPow that defends against RSA Timing attack?". C) "Can we defends against RSA Timing attack when we use java.math.BigInteger.modPow?". Is the question focused on an implementation of RSA without CRT? Why the DSA tag? Are timing attacks on the padding at decryption (which do not recover the private key) part of the question? $\endgroup$ – fgrieu Jun 29 '20 at 6:03

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.