You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like there is an issue when loading (deserializing) an installed applet with a KeyPair class variable that is initialized with ALG_EC_FP and has generated keys.
Using algorithm ALG_RSA does not trigger the crash.
publicclassOTPAppletextendsApplet {
privatefinalKeyPairkeyPair;
OTPApplet(byte[] bArray, shortbOffset, bytebLength) {
//keyPair = new KeyPair(ALG_RSA, (short) 1024); // works on both installation and on loadkeyPair = newKeyPair(ALG_EC_FP, (short) 256); // works on installation but crashes on loadkeyPair.genKeyPair(); // note: for the crash to occur the keys must be generated
The installation / instantiation of the applet works fine.
When the app is restarted it throws an exception in SimulatorRuntime::loadApplet()
Trying to load an instance of com.licel.globalplatform.GpSimulatorRuntime
Failed to load the instance! Will use the default SimulatorRuntime
com.licel.jcardsim.esotericsoftware.kryo.KryoException: java.lang.NullPointerException: Attempt to get length of null array
Serialization trace:
preCompTable (com.licel.jcardsim.bouncycastle.math.ec.ECPoint$Fp)
G (com.licel.jcardsim.bouncycastle.crypto.params.ECDomainParameters)
params (com.licel.jcardsim.bouncycastle.crypto.generators.ECKeyPairGenerator)
engine (com.licel.jcardsim.crypto.KeyPairImpl)
impl (javacard.security.KeyPair)
keyPair (com.licel.samples.applet.OTPApplet)
It looks like there is an issue when loading (deserializing) an installed applet with a
KeyPair
class variable that is initialized withALG_EC_FP
and has generated keys.Using algorithm
ALG_RSA
does not trigger the crash.The installation / instantiation of the applet works fine.
When the app is restarted it throws an exception in
SimulatorRuntime::loadApplet()
The issue was found when trying out the app https://github.com/licel/hotp-authenticator which is using jcardsim-3.0.5.jar
The text was updated successfully, but these errors were encountered: