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

The applet AID isn't correct for NDEF use anymore #10

Closed
benbenbenbenbenben opened this issue Mar 19, 2019 · 6 comments
Closed

The applet AID isn't correct for NDEF use anymore #10

benbenbenbenbenben opened this issue Mar 19, 2019 · 6 comments

Comments

@benbenbenbenbenben
Copy link

Hi,

A colleague and I have noticed that the AID in the prebuilt cap files doesn't correspond to the correct AID for NDEF and so the applets are behaving as tags correctly at the moment.

@yp25
Copy link

yp25 commented Apr 15, 2019

it seems now the latest prebuilt cap files has
Package ID : D276000177100211010001 and
Application ID : D27600017710021101000101

l try to find the other prebuilt applet it seems the last working applet has package ID D276000085 and AID D2760000850101
https://github.com/OpenJavaCard/openjavacard-ndef/commit/3aa1672bdc5a28088387853dc219894994127400

@promovicz
Copy link
Member

The new AID is deliberate. You need to set the correct AID yourself when installing the applet. This is because I have derived 'proper' AIDs from our project namespace. Did not have time to update the guides yet.

@promovicz
Copy link
Member

promovicz commented Jul 2, 2019

For further details on the meaning of the various AID types check https://openjavacard.org/devguide/naming.html#aid-naming.

What gp.jar calls "Application AID" is actually a module AID. This then gets used as a default for the applet AID. But you can - and should - specify that yourself. The correct AID for NDEF Type 4 tags is D2760000850101.

@benbenbenbenbenben
Copy link
Author

benbenbenbenbenben commented Jul 10, 2019

If your project has diverged from NDEF then shouldn't it be a fork away from this, and this project be kept as D2760000850101? After all this project has NDEF in the name.

@promovicz
Copy link
Member

It has not diverged. It is just the tools defaulting to an AID that may or may not be the right one.

The reason for using an OJC AID is to prevent collisions in certain cases where multiple variants are preinstalled. I intend to always use 'proper' AIDs.

This project is still compliant to the spec, which says nothing about the module AID - just the applet AID. Documentation needs fixing.

promovicz added a commit that referenced this issue Jul 10, 2019
The module AID of our CAP files has changed, and various tools erroneously use
it as the applet AID. This cannot be fixed because the applet AID can not
be specified in a CAP file.

This should fix issue #10, though not in a horribly nice way.

We are still considering if moving back to the default AID is an option,
but currently we would like to stick to proper AIDs for module naming.
@promovicz
Copy link
Member

I have now fixed the usage instructions to specify the right applet AID.

As the commit states it is not really an option to "fix" the module AID in the CAP file since that will break other scenarios.

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

No branches or pull requests

3 participants