Dear team,
I am trying to use the Neo's challange-response capabilities over NFC. I did not find any relevant documentation on the website, but luckily there is the open source program yubitotp-android that you published, and from looking at the code, I realized that the protocol is ISO 7816-4 "CCID". In particular, the selectCommand used to verify that the token is nearby is
Code:
00 A4 04 00
which is "SELECT" defined by GlobalPlatform (whatever that means), with misterious fixed payload of 7 bytes
Code:
A0 00 00 05 27 20 01
and expecting no payload in the response apdu.
Apparently, the "challenge" and "program challenge" commands are using INS=1, and place the yubikey operation code (such as
SLOT_CHAL_HMAC2) into P1. The length of the command apdu payload seem to match the amount of data that is sent (in the case of that program, 8 bytes). But then, discrepancy start. For instance, I don't see the Le field (response bytes expected) in the pdu.
My goal is to get the "full-size" challenge-response, with 63 bytes challenge and 20 bytes response. How can I achieve this? Is it enough to build an apdu of 68 bytes, and put 63 into the Lc byte? Should I add the Le byte (69th) at the end containg 20? or 22 to make room for SW1-SW2?
Of course it would be best if you could publish the doc describing the protocol.
Thanks,
Eugene