Javacard beginner - questions

你说的曾经没有我的故事 提交于 2019-12-10 00:12:31

问题


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.


回答1:


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).




回答2:


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.



来源:https://stackoverflow.com/questions/22015237/javacard-beginner-questions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!