Crates.io | leekoq |
lib.rs | leekoq |
version | 0.1.0 |
source | src |
created_at | 2023-01-14 17:03:50.554156 |
updated_at | 2023-01-14 17:03:50.554156 |
description | This project is an open source pure `Rust` implementation of Microchip's KeeLoq proprietary |
homepage | |
repository | https://github.com/Ali-Mirghasemi/keeloq |
max_upload_size | |
id | 758950 |
size | 7,995 |
This project is an open source pure Rust
implementation of Microchip's KeeLoq proprietary
encryption algorithm, used in their series of KeeLoq remote key entry (RKE) devices.
Amongst others, these devices include:
This project literally has two methods, so using it is pretty straightforward:
Encrypt
use leekoq::LeeKoq;
let plain: u32 = 0x12345678;
let key: u64 = 0xCAFED00D;
assert_eq!(LeeKoq::encrypt(plain, key), 0xD0FB287C);
Decrypt
use leekoq::LeeKoq;
let cipher: u32 = 0xD0FB287C;
let key: u64 = 0xCAFED00D;
assert_eq!(LeeKoq::decrypt(cipher, key), 0x12345678);
Keys are 64-bit integers, and cipher- and plaintexts are 32-bit integers.
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.