Inside Secure ACCESSO Manual Do Utilizador
Chips and readers- USER’S GUIDE
UG 23
Version 1.0
ALGORITHMS
KEY PERMUTATION
Proceed as described below to permute a key.
Example: Permute the key K
ex
.
Kex = 0x5C
0xBC
0xF1
0xDA
0x45
0xD5
0xFB
0x5F
(0x5F)
!
0
1
0
1
1
1
1
1
(0xFB)
!
1
1
1
1
1
0
1
1
(0xD5)
!
1
1
0
1
0
1
0
1
(0x45)
!
0
1
0
0
0
1
0
1
(0xDA)
!
1
1
0
1
1
0
1
0
(0xF1)
!
1
1
1
1
0
0
0
1
(0xBC)
!
1
0
1
1
1
1
0
0
(0x5C)
!
0
1
0
1
1
1
0
0
&
&
&
&
&
&
&
&
0x6E
0xFD
0x46
0xEF
0xCB
0xB3
0xC8
(0xF4)
0xF4 = 0B
Kexp =
0x6E
0xFD
0x46
0xEF
0xCB
0xB3
0xC8
0x0B
Replace the last byte by :
CHECKSUM BYTE CALCULATION
Proceed as described below to calculate a key checksum byte.
Note: the
Note: the
⊕
symbol means a bit to bit x-or operation.
Example:
K =
0x5C
0xBC
0xF1
0xDA
0x45
0xD5
0xFB
0x5F
Kp =
0x6E
0xFD
0x46
0xEF
0xCB
0xB3
0xC8
0x0B
Checksum = 0x6E
⊕
0xFD
⊕
0x46
⊕
0xEF
⊕
0xCB
⊕
0xB3
⊕
0xC8 = 0x8A
Checksum = 0x8A = 0x75
and then,
K
x
p_chk =
0x6E
0xFD
0x46
0xEF
0xCB
0xB3
0xC8
0x75
LOAD KEY CHECKSUM CALCULATION
! Complete the 5 command bytes with 3 bytes 00 so to get 8 bytes
! Calculate RES = (Command bytes)
! Calculate RES = (Command bytes)
⊕
K
x
p.
! Calculate the checksum CHK = Most Significant 4-Bytes(RES)
⊕
Least Significant
4-Bytes(RES).