Collapse AllExpand All

10.42.14.10.1. Algorithmic "MODULO-N" Verification of PIN/PCODE Previous topic Parent topic Child topic Next topic

Test algorithm

Customers can set the verification algorithm required for the MODULO-N verification function. The expected PIN entry consists of the administered PIN code plus a verification code, i.e. PIN length = PIN+verification code. The verification code is 1-2 digits long and must be included in the PIN, as follows:

Formula for MODULO-N verification

PIN:
k
P1
k
P2
k
P3
k
P4
k
 
 
x
 
x
 
x
 
x
 
k alternative, possible positions for verification code
Weighting:
 
G1
 
G2
 
G3
 
G4
 
--------------------------------------------------------------
Product:
pPG1+
pPG2+
pPG3 +
pPG4 = check sum
(or: qpPG1+qpPG2+qpPG3+qpPG4 )
Modulo-N:
Check sum + modules
=
x, remainder y
The verification code can either be defined as:
  1. code = remainder y or code = modulus minus remainder y (complement)

Key to abbreviations in above equations:

P
=
PIN code digit
G
=
Weighting value
pPG
=
Product of (P x G)
qpPG
=
Sum of digits of products of (P x G)

The verification code is calculated as follows:

  1. Each individual digit of the PIN code is multiplied with the appropriate weighting value. When assigning the weighting values (parameter VALENCE), a value must be specified for each entered digit of the PIN, i.e. PIN code plus verification code. This is especially important if the verification code position is not at the end of the actual PIN code.
  2. The check sum is achieved by
    1. adding each product of (PxG), see example
    or
    adding the sum of the digits of each product of (PxG)
  3. The modulo-N operation is then performed, i.e. the check sum is divided by the modulus. The verification code can either be defined as
    1. the remainder left over from this division (see example)
    or
    the difference between the remainder and the modulus (complement).

Note:

  • Single-digit verification code
    If the verification code is defined as a single-digit code, and the calculated verification code is a two-digit number, the first digit is dropped and only the second digit is used (i.e. '19' becomes '9')
  • Two-digit verification code:
    If the verification code is defined as a two-digit code, and the calculated verification code is a single-digit number, a zero is prefixed as the first digit (i.e. '9' becomes '09').
    PIN length = PIN code plus verification code (if assigned).

PERSI settings for the MODULO-N verification:

You can define up to 3 modulo-N algorithms with the AMO PERSI. These are assigned to PIN types via the class-of-PIN COPIN.

Algorithm settings:

  • Weighting value (VALENCE). Single-digit value, from 1 - 9. Must be specified for all 12 possible digits of a PIN number. [Default: 2-1-2-1-2-1-2-1-2-1-2-1]
  • Modulus (MODULUS). Up to two digits, from 2 - 99 [Default: 10]
  • Length of verification code (CHKNLEN) Single-digit or two-digit code (1 or 2) [Default: 1] = single digit
  • Calculation of verification code (TYPECHKN) - remainder of modulo-N operation (division) or - complement of remainder to modulus [Default: complement of remainder to modulus]
  • Check sum type (TYPESUM) - sum of products of (PxG) or - sum of all digits of products of (PxG) [Default: sum of products]

PIN type-specific settings

  • Position of the verification code within the PIN code (1st pos. - 12th pos.) The position of the verification code is entered in the COPIN, which is assigned per PIN type. The PIN length of the PIN type(s) using the COPIN must be observed. [Default: 1st position]

Example:

Set up modulo-N algorithmic verification for PIN type PIN2.
Relevant parameters:
  • Length of PIN
5 digits
  • Weighting value per digit
5 4 3 2
  • Modulus
11
  • Position of verif. code
5th position
  • Length of verif. code
1 digit
  • Calculation of verif. code
remainder of modulo-n division
  • Check sum type
sum of products of (PxG)
The PIN to be checked is: 47119
         
verification code
PIN:
4
7
1
1
9
 
x
x
x
x
 
Weighting:
5
4
3
2
1
----------------------------------------------------------------------------------------
Product:
20+
28+
3+
2
= 53
Modulo-N:
53 : 11 = 4 Rest 9
= 9
Verif. digit type = remainder = 9
PIN 47119 is valid
(in the above example, if the modulo-N remainder were ℜ≥10, i.e. 2 digits, the first digit would be dropped)

PERSI command examples

  • Configure modulo-N algorithmic verification:
    CHANGE-PERSI:TYPE=MODULO,MODULO=1,VALENCE=5-4-3-2-1-1-1-1-1-
    1-1-1,TYPESUM=SUMPRO,MODULUS=11,CHKNLEN=1,TYPECHKN=RESTDIV;
    
  • Assign modulo-N algorithm and verification code position to COPIN:
    CHANGE-PERSI:TYPE=COPIN,COPIN=5,PINTEST=MODULO1,POSCHKN=5;
    
  • Set length of PIN type PIN2:
    CHANGE-PERSI:TYPE=SYS,PIN2LEN=5;