Skip to main content

vorn (Python)

Experimental research cipher. Not reviewed by third parties. Do not use it to protect real secrets. For real use, take AES-GCM or ChaCha20-Poly1305 from the cryptography package.

Vorn-2 is an authenticated cipher (AEAD): a duplex sponge over a 512-bit ARX permutation with prime-hopping round constants. Pure Python, no dependencies, Python 3.10+. JavaScript and Rust implementations produce identical results.

Install

pip install vorn

Password mode

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"))   # b'hello'
    print(decrypt(text, "correct-horse-battery-staple"))
except VornError:
    print("wrong password or modified data")
  • Data may be str (UTF-8) or bytes.
  • aad=b"context" adds authenticated, unencrypted associated data.
  • The key comes from scrypt (default log_n=16, r=8, p=1, about 0.25 s). Tune with log_n=, r=, p=.
  • Output layout: "VRN2" | log2(n) | r | p | salt(16) | nonce(16) | ciphertext | tag(16); the whole header is authenticated. Decryption refuses scrypt settings above 512 MiB.

Raw AEAD

import os
from vorn import seal, unseal

key, nonce = os.urandom(32), os.urandom(16)      # never reuse a (key, nonce) pair
sealed = seal(key, nonce, b"payload", b"header")  # ciphertext || 16-byte tag
unseal(key, nonce, sealed, b"header")             # raises VornError if anything was changed

Performance and limits

About 380 kB/s (1 MB in 2.6 s). Meant for small payloads; use the Rust or JavaScript implementation for speed. Not constant-time, no memory wiping.

Version note

vorn 0.1.0 used an unrelated, broken construction. Do not use it. 0.2.x is a complete redesign and is not compatible with it.

License

MIT

Metadata

Release files for vorn 0.2.1

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

Source distribution (sdist)

Source distribution for vorn 0.2.1
File Size Uploaded Provenance Actions
vorn-0.2.1.tar.gz 9.5 kB Without provenance Details for vorn-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vorn 0.2.1
File Interpreter ABI Platform Actions
vorn-0.2.1-py3-none-any.whl Python 3 none any Details for vorn-0.2.1-py3-none-any.whl

Total release size: 16.2 kB

Release files / vorn-0.2.1.tar.gz

Download URL vorn-0.2.1.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b3394c05cfefd9cfab0fef39d0f7c715f49b6a1ede74a2ca5373c8caaa3d4183
BLAKE2b-256 checksum
How to use checksums
02e0302b160ef6f9bac5f858fe8c1884951d25d15c17e02e4a08e5703e1e75ba
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.1-py3-none-any.whl

Download URL vorn-0.2.1-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
886e1e8a9316fad6ec6b5f2ac3cee1dc8b8d3c382e7cfd6f57842f8d96c5e43e
BLAKE2b-256 checksum
How to use checksums
ab413541b2a934ac5bb49bcc794033cc49284140f8d116f0cc5eac256fb5706a
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.1

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

0.2.1 This release

2 release files 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