GithubHelp home page GithubHelp logo

jc-pin-manager's Introduction

JC-PIN-Manager

A JavaCard applet for setting the global PIN (0x11) on a card using GlobalPlatform API.

Prerequisites

Environment Setup

  1. Initialise JavaCard SDK binaries by running the following commands:
git submodule init
git submodule update
  1. Ensure that your JAVA_HOME environment variable is set to Open JDK 11, for example on OS X you can run:
export JAVA_HOME=$(/usr/libexec/java_home -v 11)
  1. Install the Python prerequisites by running pip3 install -r requirements.txt or equivalent on your platform.

To build and run the applet

  1. Build the applet by running ant from the project root directory.
  2. Install the resulting applet onto your JavaCard using GlobalplatformPro. Note that the CVMManagement priviledge is necessary for the applet to administrate PINs, also known as Cardholder Verification Methods (CVMs), on the card. On an unlocked card please run:
gp --install bin/SetupApplet.cap --privs CVMManagement         

Otherwise, you must specify your card keys using e.g.,

gp --install bin/SetupApplet.cap --privs CVMManagement --key-enc ENC-KEY --key-mac MAC-KEY --key-dek DEK-KEY      
  1. Run the setup_card.py host application which will instruct the applet to return the number of PIN retries on the global PIN, reset the global PIN to 3333 and then verify the new PIN.

Debugging

Has been tested using the Taisys SIMoME only. Please let me know if it also works on your hardware! You may need to replace the GlobalPlatform API jar file with a version which is compatible with your JavaCard.

jc-pin-manager's People

Stargazers

 avatar

Watchers

 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.