CRM & Cloud

Issues I faced in CRM & Cloud solutions

Tool to send APDU to Javacard

I have written a Java Card (Javacard) shell by which you can communicate with a real javacard compliance smart card. This tool is opensource and can be downloaded from github.

I named it as "GPCShell", global platform shell. By using this shell following can be performed:


  • APDUs can be sent and received
  • Status command can be send and received
  • It is complaint to Global Platform and ISO7816-4
  • It can be used to upload .cap files to a real javacard
The project is compiled via Netbeans and can be downloaded and extended.

A demo is presented here:


The tool works as follows:
  • Card is using a XML file for the Card Manager Id and security keys
  • It reads Card Manager Id from the XML and connects to the card
  • Security keys can be updated by providing SH1 256 byte keys in the XML
  • The tool uses provided security keys in the XML to authenticate the Card using SCP01 and SCP02
The structure of the XML file is as below:



<Shell>
<config></config>
<card>
<cardManager>A000000003000000</cardManager>
<keys>
<current>
<key type="S_ENC">404142434445464748494A4B4C4D4E4F</key>
<key type="S_MAC">404142434445464748494A4B4C4D4E4F</key>
<key type="S_DEK">404142434445464748494A4B4C4D4E4F</key>
</current>
<new>
<keySet>01</keySet>
<key type="S_ENC">404142434445464748494A4B4C4D4E4F</key>
<key type="S_MAC">404142434445464748494A4B4C4D4E4F</key>
<key type="S_DEK">404142434445464748494A4B4C4D4E4F</key>
</new>
</keys>
</card>
<cap>
<privileges>02</privileges>
<Parameters>0000</Parameters>
</cap>
</Shell>
view raw test.xml hosted with ❤ by GitHub

No comments:

Post a Comment