Musclecard applet

[we are still working on ebuilds and on this article]

Introduction
MuscleCard Applet is a Java applet which enable your javacard to store cryptographic key and PIN with their ACL. If you install this applet you'll be able to use your smartcard with opensc tools to get PKCS#11 support.

Installation
Building applet from sources take much time, choose your preferred method.

Installation with prebuild MCardApplet
Get the applet then jump to "Uploading applet on the javacard" section

For most of smartcards
For most of smartcards you can use this applet Muscle Card Applet

For e-gate smartcards
If you have an e-Gate smartcards, get build applet at Muscle Card Applet (transf version)

Installation without prebuild MCardApplet
If you want to build the applet from sources you'll have a to make the proper environment. Building applet requires Javacard 2.1.2, JDK 1.3.1_20 and captransf.jar if you got an e-gate smartcard.

Download this script MCardApplet.sh and follow instructions. Once you're done with building the applet, you'll have to follow instruction of section "Uploading applet on the javacard"

Uploading applet on the javacard
To install the applet you'll have to emerge some tools : gpshell will allow you to upload / delete applets on your smartcard. MuscleFramework will allow you to use Muscletools with pcsc-lite, it's part of MuscleCardFramework. Muscletools will enable you to configure the Muscle Card Applet.

Applet configuration (muscletools)
Before beginning configuration you have to get pcsc-lite recognizing your smartcard (you should be able to read its ATR).

Then, run muscletools to initialize your smartcard.

muscleTool : tokens

format 1

Transport key      : Muscle00 Admin PIN          : XYZW User PIN           : XYZW (3 tries) User unblock PIN   : ABCD (3 tries) Object memory      : 16000 bytes Create object ACL  : 0x0002 Create key ACL     : 0x0002 Create PIN ACL     : 0x0001