crocs-muni / JCAlgTest

Automated testing tool for algorithms from JavaCard API supported by particular smart card. Performance testing of almost all available methods. The results for more than 100+ cards.
http://jcalgtest.org
MIT License
113 stars 44 forks source link

Add support for custom AID when running AlgTestJClient #185

Open GrimzEcho opened 5 years ago

GrimzEcho commented 5 years ago

I would like to use this to test the capabilities of Fidesmo devices. Specifically, the Fidesmo reference card, and the human-implantable VivoKey (currently in beta).

Fidesmo is a kind of a Google Play for JavaCard applets. In order to install an applet onto a Fidesmo card, the developer must use a pre-configured AID provided by Fidesmo.

I was able to use Fidesmo's tools to compile AlgTest_JavaCard to a .cap file using the Fidesmo supplied AID and then load it on a Fidesmo card. However, it appears that the application ID is hard-coded into https://github.com/crocs-muni/JCAlgTest/blob/42abaaaa683d8edd4eaa11b540ac671fcc8cb375/AlgTest_JClient/src/algtestjclient/CardMngr.java#L125-L131.

I tried changing the AID and building the client using the supplied ant configuration, but ran into ~100 compiler errors for missing symbols (many related to unit testing). I'm using IntelliJ and don't have enough experience (or time) to try and setup a working build envrionment based on the Ecliplise project properties.

petrs commented 5 years ago

Hi Brian, this is interesting use-case and easy to fix. Do you have the AID assigned for every new applet differently, or there is one fixed?

martinpaljak commented 5 years ago

As a sidenote - all Fidesmo devices are already in the comparison matrix and the chips are publicly known (have a look here for example: https://github.com/fidesmo/fdsm/blob/master/src/main/java/com/fidesmo/fdsm/FidesmoCard.java#L67)

GrimzEcho commented 5 years ago

A new package/application AID is made for each applet. The AID is composed of a fixed prefix, vendorassigned application id, and user chosen suffix. (A0:00:00:06:17:00:${application id}:${custom suffix up to 6 bytes}).

I'm not quire sure how to translate the static profiels that @martinpaljak provided into entries in the results matrix. I see a lot of entries for various NXP chips, but not sure what specific entry corresponds to the Fidesmo reference card or the VivoKey,

martinpaljak commented 5 years ago

The reference card is JCOP 2.4.2 R2