• No results found

Offline PIN Processing

Cardholder Verification

8.4.2 Offline PIN Processing

The following requirements apply whether a PIN is transmitted in the clear to the card or the PIN is enciphered at the PIN pad or card reader and

deciphered by the card.

1. Checking the PIN Try Counter

After the terminal determines that an offline PIN is to be entered, the terminal may transmit a GET DATA command to the card to retrieve the PIN Try Counter.

a. If the card supports returning the PIN Try Counter with the GET DATA command, the card shall:

■ Set the PIN Try Limit Exceeded bit to “1” in the CVR if the PIN

Try Counter is zero.

■ Return the PIN Try Counter to the terminal in the GET DATA

response. The terminal does not allow offline PIN entry if the PIN Try Counter is zero.

b. If the card does not support return of the PIN Try Counter with the GET DATA command, the card shall return an SW1 SW2 error code to the terminal. This error code should be “6A88”.

Figure 8–1: Checking The PIN Try Counter

2. PIN Encipherment

If the CVM is Offline Enciphered PIN, the terminal requests an unpredictable number from the card using the GET CHALLENGE command. The card shall generate and return an unpredictable number that the terminal uses in the PIN encipherment algorithm.

Figure 8–2: PIN Encipherment

Card supports return of PIN Try

Counter?

Card sets error in GET DATA

response. PIN Try

Counter = 0?

Set “PIN Try Limit Exceeded” in CVR.

Card inserts PIN Try Counter in GET DATA response. Card returns response GET DATA command GET DATA response N Y N Terminal Card Y

Card generates & returns unpredictable

number. GET CHALLENGE

command

GET CHALLENGE response w/ unpredictable number

Visa Integrated Circuit Card Card Specification, Version 1.4.0

8.4 Processing

3. Receiving the VERIFY command

After the Transaction PIN is entered, the terminal transmits a VERIFY command containing this PIN. When the VERIFY command is received, the card shall set Offline PIN Verification Performed to “1” in the CVR. The Transaction PIN may be plaintext or enciphered as shown by the P2 parameter of the VERIFY command:

a. P2 = “80”—The PIN is in the clear. The card shall proceed to the PIN Verification step.

b. P2 = “88”—The PIN is enciphered. The card shall decipher the PIN using the ICC PIN Encipherment Private Key, if present, or ICC Private Key if the ICC PIN Encipherment Private Key is not present. This process is described in the EMV 4.0, Book 2, Section 7. If errors occur during PIN decipherment, PIN verification has failed.

4. PIN Verification

The card performs the following PIN verification steps: a. PIN Try Limit Already Exceeded

If the PIN try function is blocked because the PIN Try Limit was exceeded previously, the card shall:

■ Set the CVR PIN Try Limit Exceeded to “1”

■ Set the CVR Offline PIN Verification Failed bit to “1”

■ Return SW1 SW2 = “6984” in the VERIFY response if the PIN Try

Limit was exceeded on a previous transaction

■ Return SW1 SW2 = “6983” in the VERIFY response if the PIN Try

Limit was exceeded during the current transaction b. Matching PINs

If the PIN try function is not blocked, the card shall compare the Transaction PIN to the Reference PIN. If they match, the card shall:

■ Reset the PIN Try Counter to the PIN Try Limit value

■ Set the CVR Offline PIN Verification Failed bit to “0”

■ Return a VERIFY command response indicating that the

c. Non-Matching PINs

If the Transaction PIN does not match the Reference PIN, the card shall:

■ Decrement the PIN Try Counter by one

■ Set the CVR Offline PIN Verification Failed bit to “1”

The card shall determine whether the PIN Try Limit was exceeded:

■ No PIN tries remaining

If the resulting value of the PIN Try Counter is zero, the card shall – Set the CVR PIN Try Limit Exceeded bit to “1”

– If Application Default Action (ADA) is present and PIN Try Limit Exceeded on Current Transaction, Block Application bit in the ADA is “1”, set the Application Blocked by Card because PIN Try Limit Exceeded bit to “1” in the CVR and block the application. The card shall allow the current transaction to proceed through Completion. Blocking the application as described here shall not permanently disable the application or the card.

– Return a VERIFY command response indicating that the PIN Try Limit is exceeded (SW1 SW2 = “63C0”)

■ PIN Tries Remaining

If the resulting value of the PIN Try Counter is not zero, the card shall return a VERIFY command response indicating the

remaining number of PIN tries (SW1 SW2 = “63Cx” where x equals the remaining PIN tries).

Visa Integrated Circuit Card Card Specification, Version 1.4.0

8.4 Processing

Figure 8–3: Offline PIN Processing

Block application PIN Try Limit

Exceeded?

Set “Offline PIN Verify

Failed” in CVR Transaction PIN = Reference

PIN?

Decrement PIN Try Counter by 1

Set “Offline PIN Verify Failed” in CVR

PIN Try Limit Exceeded?

ADA = “If PIN Try Limit exceeded, block

applic”?

Set Appl. blocked because PIN Try Limit exceeded in

CVR Reset PIN Try

Counter to PIN Try Limit

Set Offline PIN Verify Failed to “0” in CVR

Y

Set VERIFY return code to Successful

Completion (SW1 SW2 = 9000)

Y Set VERIFY return

code to Fail with no retries remaining (SW1 SW2 = 6984)

Set VERIFY return code to Fail with retries remaining (SW1 SW2 = 63Cx)

Set “Offline PIN Verification Performed” in CVR

Set “PIN Try Limit Exceeded” in CVR VERIFY command with PIN N N Y N VERIFY command response Return VERIFY command response to terminal VERIFY P2 = 88

Decipher PIN using ICC PIN Encipherment or ICC Private Key Y N Terminal Card N

Set VERIFY return code to No PIN Tries

Remaining (SW1 SW2 = 63C0) First VERIFY

in transaction?

Y

Set VERIFY return code to Fail with no retries remaining (SW1 SW2 = 6983)

N

Set PIN Try Limit Exceeded in CVR

5. Follow-up Processing

After each unsuccessful PIN try with PIN tries remaining, the terminal requests another PIN entry and sends the card another VERIFY

command.

If PIN verification is successful prior to the PIN Try Counter being decremented to zero, the card shall:

– Reset the PIN Try Counter to the value of the PIN Try Limit – Set the Offline PIN Verification Failed bit to “0” in the CVR.

The cardholder may continue to enter a PIN until the PIN Try Counter is decremented to zero. At that time, the terminal will not transmit any further VERIFY command messages to the card.