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