Pure-Python Lai–Massey block ciphers: IDEA-LM, FOX-LM, MISTY1-LM with ECB/CBC/CTR modes.
Project description
Lai–Massey Cryptographic Library
This project implements several block ciphers based on the Lai–Massey scheme:
- IDEA-LM
- FOX-LM
- MISTY1 (full cipher)
- MISTY1-LM variant
- ECB / CBC / CTR modes
The implementation is pure Python and designed for learning, research, and security experimentation.
Features
- Modular architecture
- Realistic key schedules
- Reversible encryption/decryption
- Fully separated FI/FO/FL for MISTY1
- Test suite included
Quick Example
from laimassey.idea_lm import IDEA_LM
cipher = IDEA_LM(key=b"1234567890ABCDEF")
ct = cipher.encrypt_block(b"ABCDEFGH")
pt = cipher.decrypt_block(ct)
print(pt)
#Crypto add fro easy using
from laimassey.Crypto import LM
cipher = LM.new(
key=b"1234567890ABCDEF",
algorithm="FOX",
mode="CBC",
iv=b"ABCDEFGH"
)
pt = b"ABCDEFGHABCDEFGH"
ct = cipher.encrypt(pt)
rt = cipher.decrypt(ct)
print(ct.hex())
print(rt)
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
laimassey-0.1.6.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
laimassey-0.1.6-py3-none-any.whl
(11.6 kB
view details)
File details
Details for the file laimassey-0.1.6.tar.gz.
File metadata
- Download URL: laimassey-0.1.6.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f980d628a733ccea22b67b81b510aa29072b079d81016dd7f6bc631ce1e56c77
|
|
| MD5 |
a6abe8b02582380fba5272ff91acfb8d
|
|
| BLAKE2b-256 |
1fe1d40b04c03e2e430f8c2d8e039fc90fcdcf45d4c3be084be0ddc08d63c14e
|
File details
Details for the file laimassey-0.1.6-py3-none-any.whl.
File metadata
- Download URL: laimassey-0.1.6-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34a97741458b0334399c43e3d1ed0c980a04e55a18d871fcdade617e92de5e1d
|
|
| MD5 |
97c54bb7e21e2d5a837839b5dbc4f05f
|
|
| BLAKE2b-256 |
09e2d19a9d2e604f8d1b2e4ed824a71186bfbe521b9c7df9a3ada479ab0d4678
|