Skip to main content

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

Metadata

Release files for pytrivium 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytrivium 1.0.7
File Size Uploaded Provenance Actions
pytrivium-1.0.7.tar.gz 5.0 kB Without provenance Details for pytrivium-1.0.7.tar.gz

Release files / pytrivium-1.0.7.tar.gz

Download URL pytrivium-1.0.7.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6a30b4e4492e7e5d585a39906998d015244c5f217ba4b7399cd629944a8001f3
BLAKE2b-256 checksum
How to use checksums
b0e39315ad936fe1f1df586fad5d1d04384ad9092a43f5bd4c8847fc82b90413
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for pytrivium 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.7 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page