-1

I have SPR332 pinpad reader and i have to write programm on java that verify pin of bank cards.

So this is my PINverifyStructure :

bTimeOut = 0х00
bTimeOut2 = 0х00
bmFormatString = 0x82
bmPINBlockString = 0x47
bmPINLengthFormat = 0x04
wPINMaxExtraDigitMax = 0x0c 
wPINMaxExtraDigitMin = 0x00 
bEntryValidationCondition = 0x02
bNumberMessage = 0x01
wLangId = 0x09 0x04 
bMsgIndex = 0x00
bTeoPrologue = 0x00 0x00 0x00
ulDataLength = apduLength 0x00 0x00 0x00

Verify APDU command is :

CLA = 0x00
INS = 0x20
P1 = 0x00
P2 = 0x00
LC  = 0x08
0x20
0xff
0xff
0xff
0xff
0xff
0xff
0xff

After this i enter pin on pinpad, then i receive APDU response 6a86. In APDU responses specification it means "Incorrect P1 or P2 parameter."

Please, help, what's wrong with my command?

I changed P2 to 0x01 , response is the same 6a86

NovaCenturion
  • 187
  • 1
  • 3
  • 16
  • 1) Get the Verify command working in direct mode. 2) Read the manual of the reader carefully, how to wrap that APDU, so the reader can fill in the entered PIN. (This may be a VERIFY command, but could be something totally different). 3) Then try to achieve APDU modification by the reader. – guidot Mar 30 '16 at 11:40
  • 1) Direct mode gives same response **6a81** 2) I dont have any manual of Identive SPR332 pinpad and Google search was unsuccesfull – NovaCenturion Mar 31 '16 at 05:03

2 Answers2

0

See EMV Book 3, 6.5.12 VERIFY Command-Response APDUs.

P2 should be 0x80 - PlaintextPin or 0x88 - EncipheredPin. In your case - 0x80.

Alexander Vgn
  • 470
  • 2
  • 8
  • I've changed it to 0x80, then i received code 6a81 that means "Function not supported." Does it mean that my cardreader doesnt have verify function? – NovaCenturion Mar 30 '16 at 09:41
  • Command plaintext Verify shold be smth like this: 00 20 00 80 08 24 12 34 FF FF FF FF FF. Please check field N PIN length. 6A81 may means that card was previously blocked. Could you please provide full sequence of command with responce ? – Alexander Vgn Mar 30 '16 at 10:06
  • VERIFY_PIN_START [00:00:82:47:04:0c:00:02:01:09:04:00:00:00:00:0d:00:00:00:00:20:00:80:08:20:ff:ff:ff:ff:ff:ff:ff] GET_KEY_PRESSED: 0x2b (user entered valid key 0-9) GET_KEY_PRESSED: 0x2b (user entered valid key 0-9) GET_KEY_PRESSED: 0x2b (user entered valid key 0-9) GET_KEY_PRESSED: 0x2b (user entered valid key 0-9) GET_KEY_PRESSED: 0x0d (user confirmed) VERIFY_PIN_FINISH response [6a:81] – NovaCenturion Mar 30 '16 at 10:21
0

I've finally found why response was 6a81.

It was because i have EMV card, so VERIFY command should be called in a specific order (after SELECT FILE, GET PROCESSING OPTIONS, READ RECORD, GET DATA).

Now i have 9000. Thx all

NovaCenturion
  • 187
  • 1
  • 3
  • 16