Page tree

Versions Compared

Key

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

ISO-0 (Format 0)

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 length of the PIN, P is PIN digit, F is padding value "F"

    12345678910111213141516
    0LPPPPP/FP/FP/FP/FP/FP/FP/FP/FP/FP/F


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

    12345678910111213141516
    0000PANPANPANPANPANPANPANPANPANPANPANPAN


  3. 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

...