Skip to main content

Python implementation of Keeloq encryption algorithm

Project description

LeeKoq

This project is an open source pure Python 3 implementation of Microchip's KeeLoq propietary encryption algorithm, used in their series of KeeLoq remote key entry (RKE) devices.

Amongst others, these devices include:

Usage example

This project literally has two methods, so using it is pretty straightforward:

>>> import leekoq
>>> key = 0xCAFED00D
>>> cipher = leekoq.encrypt(0x12345678, key)
>>> hex(cipher)
'0x260afde3'
>>> plain = leekoq.decrypt(cipher, key)
>>> hex(plain)
'0x12345678'

Keys are 64-bit integers, and cipher- and plaintexts are 32-bit integers.

License

The code of this project is licensed under the Do What The Fuck You Want License, version 2:

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.

KeeLoq is a registered trademark of Microchip Technologies Inc.

Please note that neither the author is not affiliated with, nor this project is endorsed by Microchip Technologies, Inc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leekoq-1.0.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

leekoq-1.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page