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


Release history Release notifications

This version

0.1

Download files

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

Files for leekoq, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size leekoq-0.1-py3-none-any.whl (3.6 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size leekoq-0.1.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page