Python bindings to a C implementation of Trivium
Project description
Trivium - Python Implementation
Here is a Python implementation of Trivium. It uses cffi to bind Python with the C implementation.
This package provides short examples to learn about Python bindings and distributing packages.
Installation
I advise you to install it in a virtualenv.
$ pip install pytrivium
Demo
from pytrivimum import Trivium
# Set 6, vector# 3:
key = [0xfa, 0xa7, 0x54, 0x01, 0xae, 0x5b, 0x08, 0xb5, 0x62, 0x0f]
iv = [0xc7, 0x60, 0xf9, 0x92, 0x2b, 0xc4, 0x5d, 0xf6, 0x8f, 0x28]
engine = Trivium()
engine.initialize(key, iv)
engine.update(8)
output = engine.finalize()
print([hex(i) for i in output])
# Require Python >= 3.6
python demo.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytrivium-1.0.7.tar.gz
(5.0 kB
view details)
File details
Details for the file pytrivium-1.0.7.tar.gz.
File metadata
- Download URL: pytrivium-1.0.7.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a30b4e4492e7e5d585a39906998d015244c5f217ba4b7399cd629944a8001f3
|
|
| MD5 |
80cdaecb082ed0a5693c33b2ce1a366a
|
|
| BLAKE2b-256 |
b0e39315ad936fe1f1df586fad5d1d04384ad9092a43f5bd4c8847fc82b90413
|