Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Is the first and most common PIN block encoding format based on ISO 9564 - an international standard for personal identification number (PIN) management and security in retail banking.

Calculation steps:

  1. Prepare a PIN - L is the length of the PIN, P is the PIN digit, F is the padding value "F"

...

  1. Prepare PAN - take 12 rightmost digits of the primary account number (excluding the check digit)

    12345678910111213141516
    0000PANPANPANPANPANPANPANPANPANPANPANPAN


  2. XOR both values

    12345678910111213141516
    0LPPPPP/FP/FP/FP/FP/FP/FP/FP/FP/FP/F
    XORXORXORXORXORXORXORXORXORXORXORXORXORXORXORXOR
    0000PANPANPANPANPANPANPANPANPANPANPANPAN


Example:

PIN blocks: PIN block encrypt operation finished
****************************************
PAN:            43219876543210987
PIN:            1234
PAD:            N/A
Format:         Format 0 (ISO-0)
----------------------------------------
Clear PIN block:0412AC89ABCDEF67

PIN blocks: PIN block decode operation finished
****************************************
PIN block:      0412AC89ABCDEF67
PAN:            43219876543210987
PAD:            N/A
Format:         Format 0 (ISO-0)
----------------------------------------
Decoded PIN:    1234