Question

first of all i want to let you know that i am new regarding javacards. I am in the research phase of writing a javacard applet and i have some questions which suprisingly are not so easy to answer through google-search. I want to create an android application which triggers a javacard application via NFC. So far i established a connection to the card with IsoDep.

  1. Lets say i have a cap-file. How do I put/install it on an actual javacard? (Do i need a card reader/writer with PC/SC? Which ones do you suggest)

  2. Is it possible to put/install the cap-file using my smartphone (via android)?

  3. Is there any way (through APDU-commands) to get information about what is on the card? Specifically: applets on the card, memory available.

Thx very much in advance for the answers.

Was it helpful?

Solution

The standard for deploying cap files onto cards is GlobalPlatform Card Specification (currently at v2.2.1). Since cards are very secure environments, you cannot just go and install your code on any card. You need to authenticate to the card, and hence have the keys to the cards you are targeting.

Assuming you have them, you can look at How to load CAP file to java card for some options. I suggest using a PC/SC reader.

Typically on Android you would have to use OpenMobileAPI which can target the SIM (if your card is a SIM) because Issuer Security Domain is not reachable over NFC (if you wanted to try this) and the IsoDep.Transceive is for sending APDUs to other contactless cards (not your SIM).

OTHER TIPS

Q1 & Q3:You can use PyAPDUTool which can communicate with the card via the reader connected to PC to install the applet on an real javacard and also get to know what is on the card.You can also manage the applet or package in the card via PyAPDUTool.

Q2:Yes,if your phone supports NFC.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top