Java Card 2.2.2: temporary RSA public key as transitional

I am developing a Java Card applet (2.2.2, thus classic), which, with each use, gets the RSA public key (verified using tools that are not relevant to the question), then use this RSA public key to verify the RSA signature.

How can I save this RSA public key in RAM (instead of writing it to EEPROM / Flash) to increase the performance and life of the device?

My problem is javacard.security.KeyBuilderJC 2.2.2, the buildKey(byte keyType, short keyLength, boolean keyEncryption)API does not seem to be able to specify temporary memory; I don't see either

Will bracketing all changes and using the RSA s public key beginTransaction()and abortTransaction()achieve my goal?

+4
source share
1 answer

I was dealing with the same problem and had to use read only memory and the level of wear (which worked).

Even with the same idea with beginTransaction()/ abortTransaction(), but the card developer was told that this would not work (they said that it would further worsen the EEPROM lifetime). YMMV.

Some notes:

  • ( ).

  • (, , , ).

  • RSAPublicKey, Cipher.

  • .

- API, RSA ( )

!

+6

All Articles