All my attemps to verify a PIN code on a PINPAD reader ends up in failure, here is my situation:
Setup
- Belgian EID card;
- Vasco DIGIPASS 875, connected in Bluetooth;
- Android application using the SDK from Vasco.
Situation
I've used APDU command to select and read files, to set the secure environment (MSE : SET), and after numerous research and merging of different solutions from different documentation, I can make the reader ask for my PIN code. But with my pseudo-APDU command, I receive a 69|C# response. The same process (reading files, set secure environment and verify the PIN) works fine on a USB reader with no PINPAD, so I guess that the APDU command is ok, but not the pseudo-APDU command that precedes.
Documentation used
The BEID documentation, PC/SC Spec part 10 (2.5.2) and supplement (2.2.1) and USB Smart Card devices for chapter from 6.1.11.3 to 6.1.11.6.
What did I understand?
The first part should be FF C2 01 06
for direct PIN verification on reader, followed by the size of the subsequent data.
Next should follow the structure from PC/SC part 10, with:
- Timeout 1 & 2 (
00
for default); - Format (should be
89
for me, as it should be10001001
for 1 byte offset PIN, justified left and BCD); - PIN block format (should be
48
because 4 bit length included and 8 byte for the PIN block); - PIN length format (
04
: 4 bit offset in the PIN block); - Min/Max PIN length :
040C
(but didn't work like that,0404
is sure to work); - Validation condition is
02
for ok button; - Number of messages :
01
to use the one in the command; - Language is
0409
for english; - Message to display is
00
for enter PIN; 000000
because this field isn't used;- The length of the final APDU command to transmit once formatted with the PIN (
0000000D
is my guess); - And then the APDU command :
0020000108FFFFFFFFFFFFFFFF
Results
I have changed several times some values that I wasn't so sure (2, 3, 4, 11 and 12 for the padding characters already present or not), with no success, just different result codes sometimes.
What do I do wrong here ?
Thx in advance !