I’m making an attempt to create a Bitcoin Key Pair utilizing Java Card 3.0.4. Compilation works good, however I’ve a runtime downside, I feel the EC algorithms usually are not applied in cref. Let me share some code:
import javacard.framework.Applet;
import javacard.safety.KeyPair;
import javacard.safety.KeyBuilder;
import javacard.safety.CryptoException;
...
public class Pockets extends Applet {
…
non-public static KeyPair keyPair;
…
protected Pockets () {
…
attempt {
keyPair = new KeyPair (KeyPair.ALG_EC_FP, KeyBuilder.LENGTH_EC_FP_256);
} catch (CryptoException e) {
motive = (quick) e.getReason();
}
…
}
…
}
The exception is thrown and catched, and I get motive 3:
3: NO_SUCH_ALGORITHM
public static last quick NO_SUCH_ALGORITHM
This motive code is used to point that the requested algorithm or key sort shouldn't be supported.
My cref is:
Java Card 3.0.4 C Reference Implementation Simulator
32-bit Tackle House implementation - with cryptography assist
T=1 / T=CL Twin interface APDU protocol (ISO 7816-4)
Copyright (c) 2011, Oracle and/or its associates. All rights reserved.
Is there any cref model or configuration I can use to make my code work?
Thanks !