Formatting the AES DUKPT PIN Block using AES 256-bit BDK-2 using 12-digit PAN (excludes check digit).
We have to use the 12 digits PAN (excludes check digit) for compatibility since most of the issuers (all of them) are still on 3DES PIN Block or ISO Format 0
However, WPAY would like to have the ability to support full PAN length (12-19 digits) readily available without big software changes.
PIN Key (derived from previous section)
62CB437131C129DF001D42676011975150506E2A382145FD9BDEA7EC5A339F63
PAN
5237481234567895
PIN
1234
Formatting AES PIN Block with 12 digits PAN (excludes check digit)
Formatting plaintext PIN field with random number
441234AAAAAAAAAAFFC853BBF9685D5E
Step 1, Encrypt the plaintext PIN field (above) with PIN key, resulted in
147CC4356769D305F1423D06D08F22CC
Formatting plaintext PAN Field
07481234567890000000000000000000
XOR Step 1 result (above) with plaintext PAN field, resulted in
1334D60131114305F1423D06D08F22CC
Step 2, encrypt the XOR'd result above with PIN key, resulted in
225EF53C962E6AD84AC671C160A44627
AES DUKPT PIN BLOCK or ISO Format 4 is
225EF53C962E6AD84AC671C160A44627
Formatting AES PIN Block with Full PAN (16 digits)
Formatting plaintext PIN field with random number
441234AAAAAAAAAAFFC853BBF9685D5E
Step 1, Encrypt the plaintext PIN field (above) with PIN key, resulted in
147CC4356769D305F1423D06D08F22CC
Formatting plaintext PAN Field
45237481234567895000000000000000
XOR Step 1 result (above) with plaintext PAN field, resulted in
515FB0B4442CB48CA1423D06D08F22CC
Step 2, encrypt the XOR'd result above with PIN key, resulted in
060E768D21D709B5D2A3F9660A704B9D
AES DUKPT PIN BLOCK or ISO Format 4 is
060E768D21D709B5D2A3F9660A704B9D