Coder Social home page Coder Social logo

crypto-javacard's Introduction

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

crypto-javacard's People

Contributors

skassam21 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.