Question

I have already developed java card applet.it use RSA for the encryption.So i want to know is there way to speed up the RSA encryption/decryption in java card.the reason is when i used RSA 2048 it takes some extra time than the RSA 512 or 1024.

Thanks SSV

Was it helpful?

Solution

RSA is inherently slow, and gets slower when you use bigger key lengths. There are however things you can do to speed up RSA operations:

  • Use a public key with a public exponent that has few bits set to 1, e.g. the fourth number of Fermat, 65537. Note that there are some attacks that can be performed on a public exponent with value 3. This only speeds up public key operations.
  • use a RSAPrivateCrtKey that includes parameters that can be used for calculations using the Chinese Remainder Theorem. This only speeds up private key operations.

If you have already generated a key pair on the card, chances are that both options have already been lifted by the chip. In that case the solution space may be empty. The only thing you can do then is to switch to Elliptic Curve cryptography (but even that may be slower for public key operations) or a different protocol using symmetric algorithms.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top