This javacard can do the following actions:
- Load a Public/Private key on the card
- Request the public key from the card
- Sign a precomputed hash using ECDSA on the card
This project is based on the hardware wallet implementation on the javacard.
The project is built using Gradle with the Fidesmo Javacard Gradle plugin. You can set the JavaCard HOME not only through the environment but also creating a gradle.properties file with the property "com.fidesmo.gradle.javacard.home" set to the correct path.
Testing is done with JUnit and performed either on a real card or on jCardSim. You
can specify to use the real card or simulator by changing the com.crypterac.card.test.simulated
value in the gradle.properties
file.
In order to test with the simulator with an IDE, you need to pass these additional parameters to the JVM
-noverify -Dcom.crypterac.card.test.simulated=true
In the lib/
folder, there are two dependencies:
- The Javacard 3.0.4 library
- Jcardsim project (forked version developed by com-status )
- The GP jar used for installing on the card (GlobalPlatformPro)
- Run
./gradlew convertJavacard
- Make sure your JRE has the JCE Unlimited Strength Jurisdiction Policy Files installed. For more information check here.
- Run
./gradlew test
- Follow all steps from the Compilation phase (except the last one). This will create the
.cap
file inbuild/javacard/com/status/wallet/javacard
. - Disconnect all card reader terminals from the system, except the one with the card where you want to install the applet.
- Run
./gradlew install
- The applet requires JavaCard 3.0.4 or later.
The card support are at least:
- KeyPair.ALG_EC_FP (generation of 256-bit keys)
- Signature.ALG_ECDSA_SHA_256