idpass / card-storage-applet

Apache License 2.0
1 stars 2 forks source link

Make Android TagInfo read emulated DESFire in Java Card #3

Open typelogic opened 3 years ago

typelogic commented 3 years ago

To check the emulated DESFire, the Android TagInfo should be able to detect and read a file content. It should be able to:

The Java Card emulated DESFire should be indistinguishable from a physical DESFire EV2 card.

typelogic commented 3 years ago

Installing datastorage as default selected and invoking from jcshell /send 906A000000 returns an unusual value 1C 9000. I still need to explicitly select the AID, after which a subsequent /send 906A000000 now returns expected value.

Installing a tiny test applet as default selected and invoking from jcshell a custom command also returns un-expected value.

It seems that an explicit select is needed.

In addition, just noting here the expected security configuration: First, there is a secure channel mechanism provided by the Card Manager's security domain. Second, the DESFire 3 pass authentication is also an additional security mechanism on top of what is provided by Java Card secure channel.

A possible real-life use case would be: A card holder's fingerprint shall authenticate to access the Datastorage and write a content having a different security configuration. That is, some portions of the stored content does not need the card holder's finger print, but instead it needs standard DESFire key to access the content. Or be made publicly readable based on the DESFire setting.

I test using Java Card types J3H145 and JC30M48CR.

typelogic commented 3 years ago

Noting here, the authentication methods to access certain content of the emulated DESFire card: