Elliptic Curve algorithm not supported by cref Java Card simulator

0
24


I’m attempting to create a Bitcoin Key Pair utilizing Java Card 3.0.4. Compilation works good, however I’ve a runtime downside, I believe the EC algorithms will not be 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) {
            purpose = (brief) e.getReason();
        }
        …
    }
    …
}

The exception is thrown and catched, and I get purpose 3:

3: NO_SUCH_ALGORITHM
public static remaining brief NO_SUCH_ALGORITHM
This purpose 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 Handle House implementation - with cryptography help
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 !

LEAVE A REPLY

Please enter your comment!
Please enter your name here