Focus on running existing code in a modern container, instead of emulating an old environment to the dumbest details. Fully open source!
vJCRE is a vritual Java Card Runtime Environment that allows to run Java code targeting the smart card platform inside a standard desktop Java virtual machine. Ideal for fast development, testing or experimentation.
Jump to ...
- Easy interfacing with any APDU-like interface:
byteexchange, like Android Host Card Emulation
- JavaCard 2.2.2+, usage of Extended APDU encouraged
- HostApduService proxy for Android
- Includes all packages with essential interfaces and abstract classes up to JavaCard v3.0.4:
- Simple, thin and modular codebase to the finest extent possible.
- Minimal one-liner pollution in
javacard*.*. The only allowed import is from pro.javacard.vre.*;
- No Javadoc or license for API specification. Go read the original API docs. (hint)
- Implements necessary JCSystem and APDU, cryptography provided either by standard JCE or BouncyCastle.
- Applet management interface, not unlike GlobalPlatform
- No support for:
- Logical channels
- Future versions
- More algorithms, including JavaCard 3.0.X features
- Multiple independent VJCRE instances in a single VM
- Saving and loading VM instances (real "virtual cards")
- Works great with the rest of the open source smart card stack.
- Made in Estonia
import pro.javacard.*; VRE vre = VRE.getInstance(); AID aid = new AID(FakeEstEIDApplet.aid); vre.load(FakeEstEIDApplet.class, aid); // Load the applet with the specified AID vre.install(aid, default); // Make a default selected instance of the applet with same AID TerminalFactory tf = TerminalFactory.getInstance("PC/SC", vre, new VJCREProvider()); CardTerminals terms = tf.terminals(); // Now use javax.smartcardio as you would do when talking to a real smart card
Get it now!
- jCardSim - https://github.com/licel/jcardsim
- JavaCard 2.2.1, T=0 only
- Apache license (Also in JC API classes???)
- Currently implements more algorithms
- AlgTest - https://github.com/petrs/AlgTest