Difference between revisions of "JavaCard"
m (→JCShell) |
m (→Standards) |
||
Line 1: | Line 1: | ||
− | ==Standards== |
+ | ==Standards & Documents== |
* [http://www.oracle.com/technetwork/java/javame/javacard/download/platformspec/index.html JavaCard] |
* [http://www.oracle.com/technetwork/java/javame/javacard/download/platformspec/index.html JavaCard] |
||
* [http://globalplatform.org/specificationscard.asp GlobalPlatform] |
* [http://globalplatform.org/specificationscard.asp GlobalPlatform] |
||
+ | * [http://www.informatik.uni-augsburg.de/lehrstuehle/swt/se/teaching/fruehere_semester/ws0708/javacard/Dokumentation/JCADG.pdf Java Card Applet Developer Guide (pdf)] |
||
+ | * Smart Card Handbook |
||
+ | * [ http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-4.aspx ISO 7816-4] |
||
+ | |||
==[https://en.wikipedia.org/wiki/Java_Card_OpenPlatform JCOP]== |
==[https://en.wikipedia.org/wiki/Java_Card_OpenPlatform JCOP]== |
||
Generally speaking JCOP-specific detailed information can only be obtained at NXP. |
Generally speaking JCOP-specific detailed information can only be obtained at NXP. |
Revision as of 21:32, 25 May 2012
Standards & Documents
- JavaCard
- GlobalPlatform
- Java Card Applet Developer Guide (pdf)
- Smart Card Handbook
- [ http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-4.aspx ISO 7816-4]
JCOP
Generally speaking JCOP-specific detailed information can only be obtained at NXP.
This page does not contain any sensitive information, only tips & tricks for people having already obtained such info & tools in adequate way.
Current versions:
- JCOP v2.4.1 R3
- JavaCard 2.2.2
- GlobalPlatform 2.1.1
- JCOP v2.4.2 R2
- JavaCard 3.0.1 Classic
- GlobalPlatform 2.2
JCOP Tools
Tools can be obtained by contacting jcop.tools@nxp.com
Current version: NXP JCOP Plugins Generic v3.3.6 & Target v1.3.6
Current requirements are WinXP SP3, Win7 32bit or Win7 64bit, and Eclipse 3.6 or 3.7
Goal is to get everything running under Linux 64bit too!
Eclipse
You first need Java. I'm using OpenJDK 1.6
apt-get install openjdk-6-jre
Needed components are eclipse-platform & eclipse-jdt
apt-get install eclipse
Follow tools instructions to install JCOP plugins
Eclipse activation:
We'll see later how to use a real reader via jpcsc but for activation it doesn't work so better to use one of the other activation methods for now.
Configuration:
- Windows / Preferences / Java / Compiler / Compliance Level: 1.5
- Windows / Preferences / Java / Debug / Unselect "Suspend Execution on uncaught exceptions"
Simulators
There are still a couple of linux simulators available in the tools but not much.
You can see them in Debug/Run Configurations... / JavaCard Application / JavaCard Simulation / Configure. At time of writing, only v2.3.1 and v2.4.1R3 are available.
But... the other simulators for Windows work fine through wine.
So you can create in all ~/.eclipse/org.eclipse.platform_3.7.0_*/plugins/com.ibm.bluez.jcop.eclipse.targetpacks.smartmx_1.3.6/simul/mask*/linux/ a script jcop to use the Windows version:
#!/bin/bash wine $(dirname $0)/../win32/jcop.exe $*
So corresponding versions will appear in JavaCard Simulation configuration.
Simulators can also be run alone, for use with JCShell or jcop_simul_ihdhandler:
sh ~/.eclipse/org.eclipse.platform_3.7.0_.../plugins/com.ibm.bluez.jcop.eclipse.targetpacks.smartmx_1.3.6/simul/maskXX/linux/jcop \ -fab=/absolute/path/to/.eclipse/org.eclipse.platform_3.7.0_.../plugins/com.ibm.bluez.jcop.eclipse.targetpacks.smartmx_1.3.6/data/maskXX/maskXX_J..._R...dat
JCShell
From the setup executable:
7z -y x nxp-offcard-2.3.0.0_Setup_NXP-JCShell.exe
You'll get a /scripts directory in which we'll only consider a few jar files.
The tool can then be used with the following helper script:
#!/bin/bash java -cp "lib/offcard.jar:lib/crypto.jar" com.ibm.jc.tools.JCShell $*
And connect to a standalone JCOP simulator:
- /term Remote
JPCSC
libpcsclite1_1.8.3-3_i386.deb
idhandler
jpcsc-0.8.0-src.zip/uzip://jpcsc/misc
RFIDIOt
RFIDIOt contains a few tools linked to JCOP