English
Language : 

HCS500-I Datasheet, PDF (17/34 Pages) Microchip Technology – KEELOQ Code Hopping Decoder
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 crypt 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 crypt key is derived as follows:
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, HCS201, HCS300, HCS301):
SourceH = Serial Number Lower 28 bits
SourceL = Seed 32 bits
For 48-bit seed encoders (HCS360, HCS361):
SourceH = Serial Number (with upper 4 bits set to zero) Upper 16 bits <<16 + Seed Upper 16 bits
SourceL = Seed Lower 32 bits
For 60-bit seed encoders (HCS362, HCS365, HCS370, HCS410, HCS412, HCS473):
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 crypt key as follows:
KeyH Upper 32 bits = Decrypt (SourceH) 64 Bit Manufacturer’s Code
KeyL Lower 32 bits = 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, HCS201, HCS300, HCS301):
SourceH = Serial Number Lower 28 bits
SourceL = Seed 32 bits
For 48-bit seed encoders (HCS360/HCS361):
SourceH = Serial Number (with upper 4 bits set to zero) Upper 16 bits <<16 + Seed Upper 16 bits
SourceL = Seed Lower 32 bits
For 60-bit seed encoders (HCS362, HCS365, HCS370, HCS410, HCS412, HCS473):
SourceH = Seed Upper 32 bits with upper 4 bits set to zero
SourceL = Seed Lower 32 bits
Then, using the manufacturer’s code the crypt 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
© 2002 Microchip Technology Inc.
DS40153C-page 17