VhlCfg / File / LegicKeyList Value
This is a list of keys required for accessing LEGIC data
segments that are encrypted with a user-defined key.
The keys are transferred into the persistent key storage
of the LEGIC SM on the first reboot after configuration
has been loaded. The configuration value is deleted
afterward.
The encryption keys are used by
LegicUserKeyIndexList.
Format
|
Name
|
Type/Size
|
Description
|
|
-
|
Array (until end of frame)
|
-
|
|
KeyIndex
|
Integer (8 bits)
|
This byte defines the index in the key storage
of the LEGIC SM the key should be stored to
(0x00...0x7F).
|
|
KeyType
|
Enumeration (8 bits)
|
This byte defines the crypto algorithm that
shall be used when working with the key.
Empty deletes the key at KeyIndex
and is followed by no key bytes.
Values (7):
-
Empty (0x00)
Empty slot; overwrites (deletes) an existing key.
AES-256 and 3K3DES keys occupy two consecutive slots:
to delete them, both slots have to be set to Empty.
-
DES (0x01)
Key length: 8 bytes
-
TripleDES (0x02)
Key length: 16 bytes
-
ThreeKeyTripleDES (0x03)
Key length: 24 bytes (occupies two consecutive slots)
-
AES128 (0x04)
Key length: 16 bytes
-
AES256 (0x05)
Key length: 32 bytes (occupies two consecutive slots)
-
MifareClassic (0x06)
MIFARE Crypto1 key A and key B (6 bytes each) in one slot
|
|
KeyDerivation
|
Enumeration (8 bits)
|
This byte defines the key derivation method
to be used when working with the key.
Values (6):
-
None (0x00)
No key derivation
-
Legic (0x01)
LEGIC key derivation
-
NxpSamAV1 (0x02)
NXP SAM AV1 compatible key derivation
-
LegicNeon (0x05)
LEGIC neon file authentication/encryption
-
LcMessage (0x06)
LC_MESSAGE encryption
-
NxpSamAV3 (0x07)
NXP SAM AV2/AV3 compatible key derivation
|
|
Optional field, condition:
KeyType == KeyType.DES
|
DesKey
|
Raw data (length 8 Bytes)
|
This is the key that shall be used for DES
encryption.
|
|
|
Optional field, condition:
KeyType == KeyType.TripleDES
|
TripleDesKey
|
Raw data (length 16 Bytes)
|
This is the key that shall be used for 3DES
encryption.
|
|
|
Optional field, condition:
KeyType == KeyType.ThreeKeyTripleDES
|
ThreeKeyTripleDESKey
|
Raw data (length 24 Bytes)
|
This is the key that shall be used for
3K3DES encryption.
|
|
|
Optional field, condition:
KeyType == KeyType.AES128
|
Aes128Key
|
Raw data (length 16 Bytes)
|
This is the key that shall be used for
AES-128 encryption.
|
|
|
Optional field, condition:
KeyType == KeyType.AES256
|
AES256Key
|
Raw data (length 32 Bytes)
|
This is the key that shall be used for
AES-256 encryption.
|
|
|
Optional field, condition:
KeyType == KeyType.MifareClassic
|
MifareClassicKeyA
|
Raw data (length 6 Bytes)
|
This is the MIFARE Classic key A.
|
|
MifareClassicKeyARfu
|
Raw data (length 2 Bytes)
|
Fixed value 0x0000
|
|
MifareClassicKeyB
|
Raw data (length 6 Bytes)
|
This is the MIFARE Classic key B.
|
|
MifareClassicKeyBRfu
|
Raw data (length 2 Bytes)
|
Fixed value 0x0000
|
|