Keeloq cipher supported

The ChipWhisperer project is fascinating. Being open-source, it is possible to look, learn, and modify at all levels.

In the past months, I made a lot of small changes to the code. But I have no write permission to the main repository. To share my contributions with the team and with the users, I have set up a fork at Github.

The main additions are:

  • Support for the Keeloq cipher: Use bit model and (soon) Hamming distance model. With partition modes, attack scripts, tutorials, and example traces.

  • Resync Slice-to-Slot filter: Fix RC oscillator clock drift, extract point ranges from each round, compress rounds to peaks.

  • Tiny improvements: Accessible color palette, bug fixes, performance improvements, etc.

Find the fork at

Code wise, it is mostly complete. Only the Hamming distance model hasn’t been pushed yet, as well as some of the external goodies such as the Keeloq demodulator/decoder.

The documentation is only half way done :frowning:

You should be able to walk through the bit model attack, using the tutorial and the example traces. There is also an up-to-date install tutorial for Linux Mint 18 (works in VMware and maybe even just a livecd boot).

Please post feedback, whether you like it or hate it, and if there are any questions or problems etc.

I hope the ChipWhisperer team merges everything useful into the main repo soon. And please in a way so that I can keep all my changes and still rebase to the current git :slight_smile: I tried to do everything in the least invasive way possible, and provide generic interfaces (like separating out partition modes as plugins).

Thanks to Colin for making ChipWhisperer open-source!!! I learned a lot with it.

Best regards,

1 Like

Great job! I think Colin may want to merge parts of your code (if not all) to the master branch in the near future (he will probably need some time to check all the changes).

Note that the attack code architecture was modified recently to support DES (and other crypto algorithms like Keeloq). I checked your code and it shouldn’t break many things, so it can be a good idea to merge it with the master branch again.

Thanks for this rather amazing code! I’ve been looking it quickly & will try to see what changes are needed with some of my latest adjustments.

I don’t know if I’ll be able to directly pull the KeeLoq stuff into master - I need to figure out about having propitiatory ciphers if it will cause grief. But with the new modular approach it should be easy to keep them externally & still work with new releases.

Thanks again for all this work & support, it’s very cool to see people really using the open-source nature, and makes all this effort worthwhile.

Hi Marc,

Did you go further with keeloq?
Is it now part of ChipWhisperer?
I’ve some question but seems to have no activity since '16…


1 Like

Hi Marc,

I have built myself a HCS301 target board and am learning ChipWhisperer. As soon as I have learned more I will see what I can get out of your work. I am sorry your work didn’t get the attention deserved.