The algorithm generates a 4-digit PIN verification value (PVV)
based on the transformed security parameter (TSP).
The algorithm requires the following input parameters:
- A 64-bit TSP
- A 128-bit PVV generation key
- A multiple encipherment of the TSP using the double-length PVV
generation key is performed.
- The ciphertext is scanned from left to right. Decimal digits are
selected during the scan until four decimal digits are found. Each
selected digit is placed from left to right according to the order
of selection. If four decimal digits are found, those digits are the
PVV.
- If, at the end of the first scan, less than four decimal digits
have been selected, a second scan is performed from left to right.
During the second scan, all decimal digits are skipped and only nondecimal
digits can be processed. Nondecimal digits are converted to decimal
digits by subtracting 10. The process proceeds until four digits of
PVV are found.
Figure 1 illustrates the PVV generation algorithm.
Figure 1. PVV Generation Algorithm
Programming Note: For VISA PVV algorithms,
the leftmost 11 digits of the TSP are the personal account number
(PAN), the leftmost 12th digit is a key table index to select the
PVV generation key, and the rightmost 4 digits are the PIN. The key
table index should have a value between 1 and 6, inclusive.