Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom AID when running AlgTestJClient #185

Open
GrimzEcho opened this issue Jan 28, 2019 · 4 comments
Open

Add support for custom AID when running AlgTestJClient #185

GrimzEcho opened this issue Jan 28, 2019 · 4 comments

Comments

@GrimzEcho
Copy link

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

public static final byte selectAppletLegacy[] = {
(byte) 0x00, (byte) 0xa4, (byte) 0x04, (byte) 0x00, (byte) 0x09,
(byte) 0x6D, (byte) 0x79, (byte) 0x70, (byte) 0x61, (byte) 0x63, (byte) 0x30, (byte) 0x30, (byte) 0x30, (byte) 0x31};
public static final byte selectApplet[] = {
(byte) 0x00, (byte) 0xa4, (byte) 0x04, (byte) 0x00, (byte) 0x0a,
(byte) 0x4a, (byte) 0x43, (byte) 0x41, (byte) 0x6c, (byte) 0x67, (byte) 0x54, (byte) 0x65, (byte) 0x73, (byte) 0x74, (byte) 0x31};
.

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
Copy link
Member

petrs commented Feb 9, 2019

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

The reference card is JCOP 2.4.2 R2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants