hcs301_programming icon indicating copy to clipboard operation
hcs301_programming copied to clipboard

Key derivation from Manufacturer key required?

Open RoganDawes opened this issue 3 years ago • 2 comments

Hi,

I'm exploring this, and I think there may be an error in your sketch.

From my research, the key programmed into the receiver should be derived from the Manufacturer key and the serial number (using the NormalKeyGen routine), rather than being a static value independent of the serial number. When I updated the sketch to derive the key from the manufacturer key and serial number, I was able to successfully read back and decrypt the transmissions.

Thanks for putting this together!

RoganDawes avatar Apr 12 '21 12:04 RoganDawes

would you be able to provide that updated sketch?

JosephShepin avatar Dec 12 '21 03:12 JosephShepin

I'm afraid I mischaracterised what I did. I actually did the derivation external to the sketch, updated the key in the sketch to match the serial number, and then ran it for only one transmitter.

However, I have made some changes to the ESPHome project, to implement keeloq support, which can be found here:

https://github.com/rogandawes/esphome/tree/keeloq

That includes routines for programming the HCS301, taken from this repository.

RoganDawes avatar Feb 15 '22 11:02 RoganDawes