Search code examples
androidjava-native-interfacesmartcard-readeremv

Parse CVM list: when to show pin pad after getting CVM list in SFI, Any command required


I am running following commands in android using JNI.

select command: 00A4040006454D5600000100(based on relavant AId)

GPO: 80A80000(modifying based on pdol)

read record : 00B2010C(Based on number of AFLs, SFI available)

after this I wanted to show pin pad if the card supports pin. I am getting following CVM list

4203 Encrypted PIN online, If terminal supports CVM, next 
1E03 Signature, If terminal supports CVM, FAIL 
1F03 No CVM

how to understand these tags in android/ java. Are there any APDU commands for this? How to process/perform cvm rules?

All suggestions would be appreciated.


Solution

  • As I understand you have some form of native EMV kernel that you call from your Android application. As a first suggestion, you should see whether such function isn't already exposed. CVM List is simply one of the objects (with identifier 0x8E) that you read with Read Record commands. The definition of what means what can be found in EMV Book 3 (look at chapter 10.5 and Annex C3) available at www.emvco.com Since Cardholder verification in EMV is performed sequentially (going through the list checking conditions apply to your transaction) it is difficult to say whether PIN will be used or not (regardless of the fact that card may support it - quite frankly it is mandated by the payment schemes for issuers to support PIN method for most of the card products). Some conditions may depend on the execution status of previous method (when b7 is set on CVM Rule Byte 1). Regarding commands, you may expect that offline PIN will require sending Get Data command requesting 0x9F17 which is Offline PIN try counter. Offline PIN will, of course, require sending Verify command presenting the PIN to be validated by th ICC.