oxcrypto
Rust-native cryptographic infrastructure for Python.
Install
oxcrypto supports Python 3.11 and newer. Add it to a uv project:
uv add oxcryptoTo install it in an active Python environment:
pip install oxcryptoBuild from source
Run these commands from the repository root with uv, Python 3.11 or newer, and Rust 1.88 or newer.
uv sync --lockedCompute a digest
from oxcrypto.hash.sha2 import SHA2
digest = SHA2.SHA256.digest(b"hello")
print(digest.hex())API reference
- Hashes
- Extendable-output functions
- Stream ciphers
- Message authentication codes
- Universal hashes
- Key encapsulation
- Signatures
- SSH
- PKI
- Secret sharing
- Threshold signatures
- Public-key encryption
- Key exchange
- Password hashing
- Password-authenticated key exchange
- One-time passwords
- Hierarchical deterministic keys
- Oblivious PRFs
- Verifiable random functions
- Random generation
- Encodings
- Permutations
- Key derivation
- Block ciphers
- Key wrapping
- Authenticated encryption
- NaCl
- HPKE
- age
- JOSE
- COSE
- PASETO
- Hash to curve
- Prime-order groups
Security
Caution
oxcrypto has not had an independent security audit. Correctness and
side-channel behavior depend on the upstream crates named on each page.
Python bytes passed to or returned by oxcrypto are not wiped from memory.
License
oxcrypto is available under MIT OR Apache-2.0. Each wheel's License-Expression also includes the licenses of the Rust crates compiled into it, and the wheel ships their notices in THIRD_PARTY_LICENSES.md.