Java Card 2.2.2: temporary RSA public key as transient

Viewed 565

I'm designing a Java Card (2.2.2 thus Classic) applet that will, at each use, receive a RSA public key (validated using means immaterial to the question), then use that RSA public key to verify an RSA signature.

How can I keep that RSA public key in RAM (rather than writing it in EEPROM/Flash), for performance and device lifetime reasons ?

My problem is, in javacard.security.KeyBuilder of JC 2.2.2, the buildKey(byte keyType, short keyLength, boolean keyEncryption) API does not seem to have an option to specify transient memory; I see neither

Would bracketing all changes and uses of my RSA public key with beginTransaction() and abortTransaction() achieve my goal?

1 Answers
Related