English
Language : 

HCS500 Datasheet, PDF (16/24 Pages) Microchip Technology – KEELOQ CODE HOPPING ENCODER
HCS500
6.0 KEY GENERATION
The HCS500 supports three learning schemes which are selected during the initialization of the system EEPROM. The
learning schemes are:
• Normal learn using the KEELOQ decryption algorithm
• Secure learn using the KEELOQ decryption algorithm
• Secure learn using the XOR algorithm
6.1 Normal (Serial Number derived) Learn using the KEELOQ Decryption Algorithm
This learning scheme uses the KEELOQ decryption algorithm and the 28-bit serial number of the transmitter to derive the
encoder key. The 28-bit serial number is patched with predefined values as indicated below to form two 32-bit seeds.
SourceH = 60000000 00000000H + Serial Number | 28 Bits
SourceL = 20000000 00000000H + Serial Number | 28 Bits
Then, using the KEELOQ decryption algorithm and the manufacturer’s code the encoder key is derived as fol-
lows:
KeyH Upper 32 bits = F KEELOQ Decryption (SourceH) | 64-Bit Manufacturer’s Code
KeyL Lower 32 bits = F KEELOQ Decryption (SourceL) | 64-Bit Manufacturer’s Code
6.2 Secure (Seed Derived) Learn using the KEELOQ Decryption Algorithm
This scheme uses the secure seed transmitted by the encoder to derive the two input seeds. The decoder always uses
the lower 64 bits of the transmission to form a 60-bit seed. The upper 4 bits are always forced to zero.
For 32-bit seed encoders (HCS200/HCS300/HCS301):
SourceH = Serial Number Lower 28 bits
SourceL = Seed 32 bits
For 48-bit seed encoders (HCS360/HCS361):
SourceH = Seed Upper 16 bits + Serial Number Upper 16 bits with upper 4 bits set to zero
SourceL = Seed Lower 32 bits
For 60-bit seed encoders (HCS410):
SourceH = Seed Upper 32 bits with upper 4 bits set to zero
SourceL = Seed Lower 32 bits
The KEELOQ decryption algorithm and the manufacturer’s code is used to derive the encoder key as follows:
KeyH Upper 32 bits = F KEELOQ Decrypt (SourceH) | 64 Bit Manufacturer’s Code
KeyL Lower 32 bits = F KEELOQ Decrypt (SourceL) | 64 Bit Manufacturer’s Code
6.3 Secure (Seed Derived) Learn using the XOR Algorithm
This scheme uses the seed transmitted by the encoder to derive the two input seeds. The decoder always use the lower
64 bits of the transmission to form a 60-bit seed. The upper 4 bits are always forced to zero.
For 32-bit seed encoders (HCS200/HCS300/HCS301):
SourceH = Serial Number Lower 28 bits
SourceL = Seed 32 bits
For 48-bit seed encoders (HCS360/HCS361):
SourceH = Seed Upper 16 bits + Serial Number Upper 16 bits with upper 4 bits set to zero
SourceL = Seed Lower 32 bits
For 60-bit seed encoders (HCS410):
SourceH = Seed Upper 32 bits with upper 4 bits set to zero
SourceL = Seed Lower 32 bits
Then, using the KEELOQ decryption algorithm and the manufacturer’s code the encoder key is derived
as follows:
KeyH Upper 32 bits = SourceH XOR 64-Bit Manufacturer’s Code | Upper 32 bits
KeyL Lower 32 bits = SourceL XOR 64-Bit Manufacturer’s Code | Lower 32 bits
DS40153B-page 16
Preliminary
© 1997 Microchip Technology Inc.