Complete list of PIN-blocks
2020-12-23

The most common PIN-block formats are based on ISO 9564, but many more are in implemented worldwide. Another common problem is that same PIN-block calculation methods are being called with their aliases, making sometimes difficult to get a right one. This article brings a list of PIN-blocks applied in payments, their calculation methods and examples and bit of related background.

Well worded Wikipedia’s definition of a PIN-block format: «The PIN is used to verify the identity of a customer (the user of a bank card) within an electronic funds transfer system, and (typically) to authorize the transfer of funds, so it is important to protect it against unauthorized disclosure or misuse. Modern banking systems require interoperability between different card issuers, acquiring banks and retailers – including transmission of PINs between those entities – so a common set of rules for handling and securing PINs is required, both to ensure technical compatibility and a mutually agreed level of security.»

PIN Block Format Alias Description
ISO-0 Format 0, ANSI X9.8, VISA-1, and ECI-0 ISO 9564-1 Format 0. An ISO-0 PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats and is similar to a VISA-4 PIN block format. The ISO-0 PIN block format supports a PIN from 4 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right. The first nibble (which identifies the block format) has the value 0.
ISO-1 Format 1 and ECI-4 ISO 9564-1:2003 Format 1. The ISO-1 PIN block format is equivalent to an ECI-4 PIN block format and is recommended for usage where no PAN data is available. The ISO-1 PIN block format supports a PIN from 4 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right. The first nibble (which identifies the block format) has the value 1.
ISO-2 Format 2 ISO 9564-3: 2003 Format 2. Format 2 is for local use with off-line systems only. The first nibble (which identifies the block format) has the value 2.
ISO-3 Format 3 ISO 9564-1: 2002 Format 3. Format 3 is the same as format 0, except that the “fill” digits are random values from 10 to 15, and the first nibble (which identifies the block format) has the value 3.
ANSI X9.8 Same as ISO 9564 Format 0 (ISO-0)
OEM-1 Diebold, Docutel, NCR The OEM-1 PIN block format is equivalent to the PIN block formats that Diebold, Docutel, and NCR define. The OEM-1 PIN block format supports a PIN from 4 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right. Identical to existing Docutel 5100 Format 8
ECI-1 Eurocheque International format 1. Same as ISO 9564 Format 0 (ISO-0)
ECI-2 Eurocheque International format 2. The ECI-2 PIN block format supports a 4-digit PIN. A PIN that is longer than 4 digits is truncated on the right.
ECI-3 Eurocheque International format 3. The ECI-3 PIN block format supports a PIN from 4 to 6 digits in length. A PIN that is longer than 6 digits is truncated on the right.
ECI-4 Eurocheque International format 4. Same as ISO 9564 Format 1 (ISO-1)
IBM 3621 The 3621 PIN block format supports a PIN from 1 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right.
IBM 3624 PIN-TRAN 4 The 3624 PIN block format is equivalent to the PIN-TRAN 4 format and supports a PIN from 1 to 16 digits in length. A PIN that is longer than 16 digits is truncated on the right.
IBM 4704-EPP (Encrypting PIN Pad) The 4704 encrypting PIN Pad PIN block format supports a PIN from 1 to 13 digits in length. A PIN that is longer than 13 digits is truncated on the right.
IBM 5906 Same as IBM 3621.
VISA-1 Same as ISO 9564 Format 0 (ISO-0)
VISA-2 Docutel 2 The VISA-2 PIN block format supports a PIN from 4 to 6 digits in length. A PIN that is longer than 6 digits is truncated on the right.
VISA-3 The VISA-3 PIN block format supports a PIN from 4 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right.
VISA-4 The VISA-4 PIN block format supports a PIN from 4 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right.
Docutel 2 VISA-2 Same as VISA-2. Contains 1-digit PIN length, 4 to 6-digit PIN and a user-defined padding string of 9 digits. If the PIN has 4 or 5 digits, it is initially padded to the right with 2 or 1 zero digits to total 6 digits.
AS2805 Format 1 The AS2805 Format 1 PIN block is used in situations where the account number is not available. The PIN block is formed by concatenation of the PIN and other data. PIN block format supports a PIN from 4 to 12 digits in length.
AS2805 Format 8 Format 46 The zero length PIN block format is identical to format 01 with the some exceptions.
ISO-4 Format 4 ISO 9564-1: 2017 Format 4. Format 4 uses AES encryption. PIN Block is padded with fill digit ‘A’ and also with random random values from 0 to 15, and the first nibble (which identifies the block format) has the value 4.

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”
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 L P P P P P/F P/F P/F P/F P/F P/F P/F P/F P/F P/F
2. Prepare PAN – take 12 rightmost digits of the primary account number (excluding the check digit)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 0 0 0 PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN
3. XOR both values
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 L P P P P P/F P/F P/F P/F P/F P/F P/F P/F P/F P/F
XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR
0 0 0 0 PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: N/A
Format: Format 0 (ISO-0)

Clear PIN block:0412AC89ABCDEF67
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 0412AC89ABCDEF67
PAN: 43219876543210987
PAD: N/A
Format: Format 0 (ISO-0)

Decoded PIN: 1234

ISO-1 (FORMAT 1)

The ISO-1 PIN block format is equivalent to an ECI-4 PIN block format. The ISO-1 PIN block format supports a PIN from 4 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right.

CALCULATION STEPS:

1. Prepare a PIN – L is length of the PIN, P is PIN digit, R is random value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 L P P P P P/R P/R P/R P/R P/R P/R P/R P/R P/R P/R

Where:

  • L – is the length of the PIN, which is a 4-bit value from X’4′ to X’C’.

  • R – is a random digit, which is a value from X’0′ to X’F’. Typically, this should be used for predetermined transaction unique data such as a sequence number.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: N/A
Format: Format 1 (ISO-1)

Clear PIN block:141234CE8C767872
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 141234CE8C767872
PAN: N/A
PAD: N/A
Format: Format 1 (ISO-1)

Decoded PIN: 1234

ISO-2 (FORMAT 2)

Format 2 is for local use with off-line systems only (e.g. smart cards).

CALCULATION STEPS:

1. Prepare a PIN – L is length of the PIN, P is PIN digit, F is padding value ‘F’
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
2 L P P P P P/F P/F P/F P/F P/F P/F P/F P/F P/F P/F

Where:

  • L – is the length of the PIN, which is a 4-bit value from X’4′ to X’C’.

  • F – is a padding character, which is a value of X’F’.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: N/A
Format: Format 2 (ISO-2)

Clear PIN block:241234FFFFFFFFFF
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 241234FFFFFFFFFF
PAN: N/A
PAD: N/A
Format: Format 2 (ISO-2)

Decoded PIN: 1234

ISO-3 (FORMAT 3)

Format 3 is the same as format 0, except that the “fill” digits are random values from 10 to 15, and the first nibble (which identifies the block format) has the value 3.

CALCULATION STEPS:

  1. Prepare a PIN – L is length of the PIN, P is PIN digit, R is random value from X’0′ to X’F’
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
3 L P P P P P/R P/R P/R P/R P/R P/R P/R P/R P/R P/R
  1. Prepare PAN – take 12 rightmost digits of the primary account number (excluding the check digit)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 0 0 0 PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN
  1. XOR both values
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 L P P P P P/R P/R P/R P/R P/R P/R P/R P/R P/R P/R
XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR
0 0 0 0 PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: N/A
Format: Format 3 (ISO-3)

Clear PIN block:3412ACC9B98CDF43
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 3412ACC9B98CDF43
PAN: 43219876543210987
PAD: N/A
Format: Format 3 (ISO-3)

Decoded PIN: 1234

ISO-4 (FORMAT 4)

ISO 9564-1: 2017 Format 4. Format 4 uses AES-128 ECB encryption. PIN Block is padded with fill digit ‘A’ and also with random random values from 0 to 15, and the first nibble (which identifies the block format) has the value 4.

CALCULATION STEPS:

1. Prepare a PIN – L is length of the PIN, P is PIN digit, F is fill digit ‘A’. R is random value from X’0′ to X’F’
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
4 L P P P P P/F P/F P/F P/F P/F P/F P/F P/F F F R R R R R R R R R R R R R R R R
2. Prepare PAN – take the primary account number – M is PAN length indicating PAN length of 12 plus the value of the field ‘0’-‘7’ (ranging then from 12 to 19). If the PAN is less than 12 digits, the digits are right justified and padded to the left with zeros and M is set to ‘0’. A is PAN digit, 0 is PAD digit ‘0’
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
M A A A A A A A A A A A A A/0 A/0 A/0 A/0 A/0 A/0 A/0 0 0 0 0 0 0 0 0 0 0 0 0
2. PIN block is encrypted with AES key
3. The resulting Intermediate Block A is then XOR’ed with PAN Block
4. The resulting Intermediate Block B is enciphered with the AES key again so we get the Enciphered PIN Block

EXAMPLE:

1
2
3
4
5
6
7
8
9
PIN blocks: PIN block encrypt operation finished  

PAN: 432198765432109870
PIN: 1234
PAD: N/A
Format: Format 4 (ISO-4)

Clear PIN block:441234AAAAAAAAAA911B9B36BC7CE94E
Clear PAN block:64321987654321098700000000000000
1
2
3
4
5
6
7
8
9
PIN blocks: PIN block decode operation finished  

PIN block: 441234AAAAAAAAAA911B9B36BC7CE94E
PAN block: 64321987654321098700000000000000
PAD: N/A
Format: Format 4 (ISO-4)

Decoded PIN: 1234
Decoded PAN: 432198765432109870

ANSI X9.8

Same as ISO-0.

OEM-1 / DIEBOLD / DOCUTEL / NCR

The OEM-1 PIN block format is equivalent to the PIN block formats that Diebold, Docutel, and NCR define. The OEM-1 PIN block format supports a PIN from 4 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right.

CALCULATION STEPS:

1. Prepare a PIN – P is PIN digit, X is pad value, which is a 4-bit value from
X’0′ to X’F’
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
P P P P P/X P/X P/X P/X P/X P/X P/X P/X X X X X

Where:

  • P – is a PIN digit, which is a 4-bit value from X’0′ to X’9′. The values of
    the PIN digits are independent.

  • X – is a pad value has a 4-bit value from X’0′ to X’F’ and must be different
    from any PIN digit. The number of pad values for this format is in the range
    from 4 to 12, and all the pad values must have the same value.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: 5
Format: Diebold, Docutel, NCR

Clear PIN block:1234555555555555
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 1234555555555555
PAN: N/A
PAD: 5
Format: Diebold, Docutel, NCR

Decoded PIN: 1234

ECI-1

Same as ISO-0.

ECI-2

The ECI-2 PIN block format supports a 4-digit PIN. A PIN that is longer than 4 digits is truncated on the right.

CALCULATION STEPS:

1. Prepare a PIN – P is PIN digit, R is random value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
P P P P R R R R R R R R R R R R

Where:

  • P – is a PIN digit, which is a 4-bit value from X’0′ to X’9′. The PIN length
    for this format is always 4.The values of the PIN digits are independent.

  • R is a random pad value, which is a value from X’0′ to X’F’. This format
    contains 12 random pad values that can have different values.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: N/A
Format: ECI-2

Clear PIN block:1234095621C2F02F
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 1234095621C2F02F
PAN: N/A
PAD: N/A
Format: ECI-2

Decoded PIN: 1234

ECI-3

The ECI-3 PIN block format supports a PIN from 4 to 6 digits in length. A PIN that is longer than 6 digits is truncated on the right.

CALCULATION STEPS:

1. Prepare a PIN – L – is PIN length, P is PIN digit, 0 is padding character
for PIN shorter than 6 digits, R is random value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
L P P P P P/0 P/0 R R R R R R R R R

Where:

  • L is the length of the PIN, which is a 4-bit value from X’4′ to X’6′.

  • P – is a PIN digit, which is a 4-bit value from X’0′ to X’9′. The values of
    the PIN digits are independent.

  • 0 – is a filling character for PIN’s shorter than 6 digits, so 4 digit PIN
    will be extended to 6 digits (1234 -> 123400).

  • R is a random pad value, which is a value from X’0′ to X’F’. This format
    contains 9 random pad values that can have different values.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: N/A
Format: ECI-3

Clear PIN block:41234E07180DD697
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 41234E07180DD697
PAN: N/A
PAD: N/A
Format: ECI-3

Decoded PIN: 1234

ECI-4

Same as ISO-1.

IBM 3621

The 3621 PIN block format supports a PIN from 1 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right.

CALCULATION STEPS:

1. Prepare a PIN – S1,S2,S3,S4 form a 2-byte sequence number that 3621 (or the originating terminal or node) assigns. P is PIN digit, X is defined padding value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
S1 S2 S3 S4 P P/X P/X P/X P/X P/X P/X P/X P/X P/X P/X P/X

Where:

  • S1 S2 S3 S4 – Forms a 2-byte sequence number that the 3621 (or the
    originating terminal or node) assigns. A 3621 assigns the sequence number in
    ascending order, starting with X’0000′.

  • P – is a PIN digit, which is a 4-bit value from X’0′ to X’9′. The values of
    the PIN digits are independent.

  • X – is A pad value has a 4-bit value from X’0′ to X’F’ and must be different
    from any PIN digit. The number of pad values for this format are in the
    range from 0 to 11, and all the pad values must have the same value.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: 5
Format: IBM 3621

Clear PIN block:0000123455555555
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 0000123455555555
PAN: 43219876543210987
PAD: N/A
Format: IBM 3621

Decoded PIN: 1234

IBM 3624

The 3624 PIN block format supports a PIN from 1 to 16 digits in length. A PIN that is longer than 16 digits is truncated on the right.

CALCULATION STEPS:

1. Prepare a PIN – P is PIN digit, X is defined padding value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
P P/X P/X P/X P/X P/X P/X P/X P/X P/X P/X P/X P/X P/X P/X P/X

Where:

  • P – is a PIN digit, which is a 4-bit value from X’0′ to X’9′. The values of
    the PIN digits are independent.

  • X – is A pad value has a 4-bit value from X’0′ to X’F’ and must be different
    from any PIN digit. The number of pad values for this format are in the
    range from 0 to 15, and all the pad values must have the same value.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: 5
Format: IBM 3624

Clear PIN block:1234555555555555
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 1234555555555555
PAN: N/A
PAD: N/A
Format: IBM 3624

Decoded PIN: 1234

IBM 4704-EPP (ENCRYPTING PIN PAD)

The 4704 encrypting PIN Pad PIN block format supports a PIN from 1 to 13 digits in length. A PIN that is longer than 13 digits is truncated on the right.

CALCULATION STEPS:

1. Prepare a PIN – L – is a PIN length, P is PIN digit, F is padding value ‘F’, S1 S2 is a 1-byte sequence number
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
L P P/F P/F P/F P/X P/F P/F P/F P/F P/F P/F P/F P/F S1 S2

Where:

  • L – is the length of the PIN, which is a 4-bit value from X’4′ to X’D’.

  • P – is a PIN digit, which is a 4-bit value from X’0′ to X’9′. The values of
    the PIN digits are independent.

  • F – is A pad value has a 4-bit value of X’F’. The number of pad values for
    this format are in the range from 0 to 12.

  • S1 S2 – is a 1-byte sequence number from X’00’ to X’FF’.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: N/A
Format: IBM 4704 EPP

Clear PIN block:41234FFFFFFFFF00
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 41234FFFFFFFFF00
PAN: N/A
PAD: 5
Format: IBM 4704 EPP

Decoded PIN: 1234

IBM 5906

Same as IBM 3621.

VISA-1

Same as ISO-0.

VISA-2

The VISA-2 PIN block format supports a PIN from 4 to 6 digits in length. A PIN that is longer than 6 digits is truncated on the right.

CALCULATION STEPS:

1. Prepare a PIN – L – is PIN length, P is PIN digit, 0 is padding character
for PIN shorter than 6 digits, D is decimal value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
L P P P P P/0 P/0 D D D D D D D D D

Where:

  • L is the length of the PIN, which is a 4-bit value from X’4′ to X’6′.

  • P – is a PIN digit, which is a 4-bit value from X’0′ to X’9′. The values of
    the PIN digits are independent.

  • 0 – is a filling character for PIN’s shorter than 6 digits, so 4 digit PIN
    will be extended to 6 digits (1234 -> 123400).

  • D is a decimal pad value, which is a 4-bit value from X’0′ to X’9′. All nine
    pad values must have the same value.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: 5
Format: VISA-2

Clear PIN block:4123400555555555
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 4123400555555555
PAN: N/A
PAD: N/A
Format: VISA-2

Decoded PIN: 1234

VISA-3

The VISA-3 PIN block format supports a PIN from 4 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right.

CALCULATION STEPS:

1. Prepare a PIN – P is PIN digit, F is PIN delimiter, X is a pad value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
P P P P P/F P/F/X P/F/X P/F/X P/F/X P/F/X P/F/X P/F/X F/X X X X

Where:

  • P – is a PIN digit, which is a 4-bit value from X’0′ to X’9′. The values of
    the PIN digits are independent.

  • F – is a a PIN digit or a delimiter X’F’. If the preceding digit is the last
    (or rightmost) PIN digit, this digit is the delimiter X’F’.

  • X is a pad value, which is a 4-bit value from X’0′ to X’F’. All the pad
    values must have the same value.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: 5
Format: VISA-3

Clear PIN block:1234F55555555555
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 1234F55555555555
PAN: N/A
PAD: N/A
Format: VISA-3

Decoded PIN: 1234

VISA-4

The VISA-4 PIN block format supports a PIN from 4 to 12 digits in length. A PIN that is longer than 12 digits is truncated on the right.

CALCULATION STEPS:

1. Prepare a PIN – 0 – is the value X’0′, L is length of the PIN, P is PIN digit, F – is the value X’F’ for the pad value, PAN is twelve 4-bit digits representing the leftmost 12 digits of the primary account number (excluding the check digit).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 L P P P P P/F P/F P/F P/F P/F P/F P/F P/F F F
2. Prepare PAN – take 12 leftmost digits of the primary account number (excluding the check digit)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 0 0 0 PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN
3. XOR both values
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 L P P P P P/F P/F P/F P/F P/F P/F P/F P/F F F
XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR XOR
0 0 0 0 PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN PAN

Where:

  • 0 is the value X’0′

  • L – is a PIN length

  • P is a PIN digit, which is a 4-bit value from X’0′ to X’9′. The values of
    the PIN digits are independent.

  • F – is a pad value of X’F’. The number of PAD digits X’F’ in the
    intermediate PIN block (IPB) is in the range from 2 to 10.

  • PAN – is twelve 4-bit digits representing the leftmost 12 digits of the
    primary account number (excluding the check digit). Each PAN digit has a
    value from X’0′ to X’9′.

EXAMPLE:

1
2
3
4
5
6
7
8
PIN blocks: PIN block encrypt operation finished  

PAN: 43219876543210987
PIN: 1234
PAD: N/A
Format: VISA-4

Clear PIN block:041277DE6789ABCD
1
2
3
4
5
6
7
8
PIN blocks: PIN block decode operation finished  

PIN block: 041277DE6789ABCD
PAN: N/A
PAD: N/A
Format: VISA-4

Decoded PIN: 1234

AS2805 FORMAT 1

The AS2805 Format 1 PIN block format is similar to an ISO-1 PIN block format. The PIN block format supports a PIN from 4 to 12 digits in length.

CALCULATION STEPS:

1. Prepare a PIN – L is length of the PIN, P is PIN digit, R is random value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 L P P P P P/R P/R P/R P/R P/R P/R P/R P/R R R

Where:

  • L – is the length of the PIN, which is a 4-bit value from X’4′ to X’C’.

  • R – is a random digit, which is a value from X’0′ to X’F’.

AS2805 FORMAT 8 (FORMAT 46)

The AS2805 Format 8 PIN block (format 46) is similar to an Format 1 PIN block format. The PIN block format supports zero length PIN Block.

CALCULATION STEPS:

1. Prepare a PIN – L is length of the PIN, P is PIN digit, R is random value
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
C L P P P P P/R P/R P/R P/R P/R P/R P/R P/R F F
8 0 R R R R R R R R R R R R F F

Where:

  • C – Control field, if is X’0′, then the PIN block is processed as a standard
    format 01 PIN block.

  • L – is the length of the PIN, which is a 4-bit X’0′ or value from X’4′ to
    X’C’. If it is X’0′ then the PIN block is a Zero PIN block. No checking of
    the PIN block is required in this case.

  • R – is a random digit, which is a value from X’0′ to X’F’.

  • F – the X’F’ character.