frankmorgner/vsmartcard

nPA AID

Closed this issue · 3 comments

I am trying to use Android Smart Card Emulator to emulate nPA. In vicc I can see it gets connected, and if I understood correctly I first need to select the AID of nPA with my card reader before I can access it's functions (specifically sign functions). Is that the correct process, and if so, where do I find the AID of nPA?

You're using vicc to implement nPA business logic and you're using Android Smart Card Emulator for mapping this to NFC, right? The nPA's AID aren't currently registered for emulation in the android app (https://github.com/frankmorgner/vsmartcard/blob/master/ACardEmulator/app/src/main/res/xml/aid_list.xml), but sending one of the registered AIDs should be enough so that the app is triggered for emulation. All subsequent data transfer is then routed through the app and forwarded to vicc.

You could, for example, use the PIV AID to "launch" the android app with the following APDU:

00 A4 04 00 09 A0 00 00 03 08 00 00 10 00 00

Perfect, thank you. I managed to access the nPA.

One of the problems was also that I was using an iPhone as an NFC card reader, and it automatically selects one of the AID from the list, which was then propagated to vicc, but it returned something other than 0x90 0x00 as a response, so the session failed immediately on the iPhone. I hade to change a code a bit so it ignores that first select and responds with 0x90 0x00.

Also, where can I find the details of the emulated card. Specifically MRZ, CAN or PIN?