I have a Smart Card applet that returns 16 bytes of random data in the response buffer of a successful VERIFY
(pin) command.
Normally (in a non-SPE regime) I send the following Verify command:
00 20 00 00 - 06 - 01 02 03 04 05 06
where the first 4 bytes are CLA, INS, P1 and P1 and the last 7 bytes are the length of the pin and the pin itself. Everything goes well, I obtain the result 9000
, and in addition in the response buffer I receive another 16 bytes of data that the card sends me by purpose.
When I however try the same thing in the Secure Pin Entry (SPE) mode so that the Pin is typed on on the PinPad (I have an Omnikey USB PinPad reader), the SPE command is:
00 00 02 00 00 06 06 02 ff 1b 04 00 00 00 00 04 00 00 00 00 20 00 00
and I type the correct Pin on the Pin Pad, I still receive 9000
response, but I don't receive the additional 16 bytes response data from the SmartCard in the SPE regime.
I know that my Smart Card applet has sent these 16 bytes of data in the response.
I'd like to ask, are these 16 bytes response data somehow stripped away by the Smart Card reader by purpose due to security constraints? I would understand that this is indeed a security restriction by the Smart Card reader. But if so, could you point me maybe to the specifications of SPE where this behaviour is described? So far I failed to find it anywhere.
Or has it maybe something to do with the SPE command that I send to the reader/SC?
UPDATE
It might be good to mention that my card is a JavaCard and the applet is a JavaCard applet that doesn't (fully) conform with the ISO7816 specifications (which indeed describe that the card for INS = 20
and 21
returns only 2 status bytes - no other additional data). Therefore I wouldn't be surprised if the PinPad card reader would adjust to this spec and would ignore other resp. data in SPE mode.