0

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.

  • Could you try and add a byte with value `10` to the end (in hex), or otherwise `00`? – Maarten Bodewes Aug 05 '14 at 18:30
  • @owlstead - Thanks for the suggestion but this didn't change the behaviour of SPE - the output was still filtered out and I received only the two SW1 and SW2 bytes. 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 = 0x20 and 0x21 returns **only** 2 status bytes - **no additional data**). Therefore I wouldn't be surprised if the PinPad card reader would adjust to this spec and would ignore other resp. data for SPE. – user3770272 Aug 06 '14 at 08:59
  • That could well be. If the card would adhere to ISO, it certainly should not send out any data if the Le byte was absent (Ne, the maximum amount of response data would be 0). Hence my suggestion. The second command is not ISO 7816-4 compatible. I presume that it is wrapped somehow, but that's just guesswork. – Maarten Bodewes Aug 06 '14 at 10:58

0 Answers0