Skip to content

vagucs/crypto-javacard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto JavaCard

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

Dependencies

In the lib/ folder, there are two dependencies:

  1. The Javacard 3.0.4 library
  2. Jcardsim project (forked version developed by com-status )
  3. The GP jar used for installing on the card (GlobalPlatformPro)

Compilation

  1. Run ./gradlew convertJavacard

Testing

  1. Make sure your JRE has the JCE Unlimited Strength Jurisdiction Policy Files installed. For more information check here.
  2. Run ./gradlew test

Installation

  1. Follow all steps from the Compilation phase (except the last one). This will create the .cap file in build/javacard/com/status/wallet/javacard.
  2. Disconnect all card reader terminals from the system, except the one with the card where you want to install the applet.
  3. Run ./gradlew install

Implementation notes

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 35.2%
  • Java 32.4%
  • Batchfile 25.9%
  • CSS 6.5%