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.3

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.3
File Size Uploaded Provenance Actions
vorn-0.2.3.tar.gz 9.6 kB Without provenance Details for vorn-0.2.3.tar.gz

Built distribution (wheel)

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

Total release size: 16.2 kB

Release files / vorn-0.2.3.tar.gz

Download URL vorn-0.2.3.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a51aeb3531d3b4d963470f7b817cf05ab1bf6ab6578fce28b872a93a8a571650
BLAKE2b-256 checksum
How to use checksums
77fcc99aa4f7356e376931971d50b3649177ad82922c7c395ed59d6dc7b616f2
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.3-py3-none-any.whl

Download URL vorn-0.2.3-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
085145995dde5532a7e9be8aa1a678e3de45887b4d6745194ae98b2db702a7f2
BLAKE2b-256 checksum
How to use checksums
03414203555dcb5d2235f75dd3c290fba07e121d7591cae55f5d8a30393111dd
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.3

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.3 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