Vorn
Experimental research cipher. Not reviewed by third parties. Do not use it to protect real secrets. For production use a standard AEAD such as AES-GCM or ChaCha20-Poly1305 (for example through the
cryptographypackage).
Vorn-2 is an authenticated encryption scheme (AEAD): a duplex sponge over a 512-bit ARX permutation (ChaCha-style quarter-rounds) whose round constants come from the square roots of primes and "hop" between state lanes according to the prime. Pure Python, no dependencies.
- Specification and test vectors: SPEC.md
- Analysis done so far (and what is not done): ANALYSIS.md
- Cryptanalysis is invited. Open an issue with anything you find.
Install
pip install vorn
Use
from vorn import encrypt, decrypt, VornError
blob = encrypt("hello", "correct-horse-battery-staple") # bytes
text = encrypt("hello", "correct-horse-battery-staple", armor=True) # base64url str
try:
print(decrypt(blob, "correct-horse-battery-staple"))
print(decrypt(text, "correct-horse-battery-staple"))
except VornError:
print("wrong password or modified data")
Associated data (authenticated, not encrypted): encrypt(data, password, aad=b"context").
Low level, with your own 32-byte key and a never-reused 16-byte nonce:
import os
from vorn import seal, unseal
key, nonce = os.urandom(32), os.urandom(16)
sealed = seal(key, nonce, b"payload", b"header") # ciphertext || 16-byte tag
unseal(key, nonce, sealed, b"header")
Performance
About 380 kB/s in pure Python (1 MB in 2.6 s). The password API uses scrypt (default n = 2^16) and takes about a quarter of a second per call. Meant for small payloads.
Version note
vorn 0.1.0 used an unrelated, broken construction and is not compatible with 0.2. Do not use it.
Tests
pip install pytest
python -m pytest
License
MIT
Metadata
Release files for vorn 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vorn-0.2.0.tar.gz | 8.7 kB | Without provenance | Details for vorn-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vorn-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for vorn-0.2.0-py3-none-any.whl |
Total release size: 15.2 kB
Release files / vorn-0.2.0.tar.gz
| Download URL | vorn-0.2.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa4b83e7410bdc282b62d1a3cfb49cdf708c00451ae8081f91418eccb6794617
|
|
BLAKE2b-256 checksum How to use checksums |
46bb7eca9fd7db7d5cfc4ac42820b61011dcd82011fe86127fee27afe11dedd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / vorn-0.2.0-py3-none-any.whl
| Download URL | vorn-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad5411575ee225aea1f8a5e2e89eb6442bc6399c330e50e3794af4f9ce76ea75
|
|
BLAKE2b-256 checksum How to use checksums |
1455a5a18837b9be1376ded870c731132ae930c098113c6ea5d51b1674a65a32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Security for vorn 0.2.0
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.