English
Language : 

HCS512_02 Datasheet, PDF (12/26 Pages) Microchip Technology – KEELOQ® Code Hopping Decoder
HCS512
7.0 KEY GENERATION SCHEMES
The HCS512 decoder has two key generation schemes. Normal learning uses the transmitter’s serial number to derive
two input seeds which are used as inputs to the key generation algorithm. Secure learning uses the seed transmission
to derive the two input seeds. Two key generation algorithms are available to convert the inputs seeds to secret keys.
The appropriate scheme is selected in the Configuration Word.
FIGURE 7-1:
Serial
Number
Patched
Manufacturer’s
Key
Key Generation
Algorithms
-------------------
Decrypt
XOR
Encoder
Key
Seed
7.1 Normal Learning (Serial Number Derived)
The two input seeds are composed from the serial number in two ways, depending on the encoder type. The encoder
type is determined from the number of bits in the incoming transmission. SourceH is used to calculate the upper 32 bits
of the crypt key, and SourceL, for the lower 32 bits.
For 28-bit serial number encoders (66 / 67-bit transmissions):
SourceH = 6H + 28 bit Serial Number
SourceL = 2H + 28 bit Serial Number
7.2 Secure Learning (Seed Derived)
The two input seeds are composed from the seed value that is transmitted during secure learning. The lower 32 bits of
the seed transmission is used to compose the lower seed, and the upper 32 bits, for the upper seed. The upper 4 bits
(function code) are set to zero.
For 32-bit seed encoders:
SourceH = Serial Number Lower 28 bits (with upper 4 bits always zero)
SourceL = Seed 32 bits
For 48-bit seed encoders:
SourceH = Seed Upper 16 bits + Serial Number Upper 16 bits (with upper 4 bits always zero) << 16
SourceL = Seed Lower 32 bits
For 60-bit seed encoders:
SourceH = Seed Upper 28 bits (with upper 4 bits always zero)
SourceL = Seed Lower 32 bits
DS40151D-page 12
© 2002 Microchip Technology Inc.