Skip to Content
oxcrypto

oxcrypto

Rust-native cryptographic infrastructure for Python.

Install

oxcrypto supports Python 3.11 and newer. Add it to a uv project:

uv add oxcrypto

To install it in an active Python environment:

pip install oxcrypto

Build from source

Run these commands from the repository root with uv, Python 3.11 or newer, and Rust 1.88 or newer.

uv sync --locked

Compute a digest

from oxcrypto.hash.sha2 import SHA2

digest = SHA2.SHA256.digest(b"hello")
print(digest.hex())

API reference

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.

On this page