Skip to content

vox-crypto API Reference (generated)

Crate: vox-crypto · Version: 0.6.0 · Target: Library (lib.rs)

Pure-Rust crypto primitives (chacha20poly1305 AEAD, ed25519, x25519); sole crypto SSOT per AGENTS.md §Cryptography Policy.

Cryptographic primitives and thin facades (hashing, signing, age/x25519).

ModuleDescription
facades—
Dependency Topology, diagram 113 nodes, 12 edges: vox-actor-runtime → vox-crypto; vox-cli → vox-crypto; vox-cli-ci → vox-crypto; vox-cli-research → vox-crypto; vox-compiler → vox-crypto; vox-gui → vox-crypto; vox-identity → vox-crypto; vox-ml-cli → vox-crypto; vox-orchestrator → vox-crypto; vox-orchestrator-mcp → vox-crypto; vo…vox-cryptovox-actor-runtimevox-clivox-cli-civox-cli-researchvox-compilervox-guivox-identityvox-ml-clivox-orchestratorvox-orchestrator-mcpvox-orchestrator-queuevox-plugin-populi-mesh
Diagram source
graph {
direction: right
node vox_crypto: "vox-crypto"
node vox_actor_runtime: "vox-actor-runtime"
vox_actor_runtime -> vox_crypto
node vox_cli: "vox-cli"
vox_cli -> vox_crypto
node vox_cli_ci: "vox-cli-ci"
vox_cli_ci -> vox_crypto
node vox_cli_research: "vox-cli-research"
vox_cli_research -> vox_crypto
node vox_compiler: "vox-compiler"
vox_compiler -> vox_crypto
node vox_gui: "vox-gui"
vox_gui -> vox_crypto
node vox_identity: "vox-identity"
vox_identity -> vox_crypto
node vox_ml_cli: "vox-ml-cli"
vox_ml_cli -> vox_crypto
node vox_orchestrator: "vox-orchestrator"
vox_orchestrator -> vox_crypto
node vox_orchestrator_mcp: "vox-orchestrator-mcp"
vox_orchestrator_mcp -> vox_crypto
node vox_orchestrator_queue: "vox-orchestrator-queue"
vox_orchestrator_queue -> vox_crypto
node vox_plugin_populi_mesh: "vox-plugin-populi-mesh"
vox_plugin_populi_mesh -> vox_crypto
}
Consumer CrateRole
vox-actor-runtimeDirect workspace dependent
vox-cliDirect workspace dependent
vox-cli-ciDirect workspace dependent
vox-cli-researchDirect workspace dependent
vox-compilerDirect workspace dependent
vox-guiDirect workspace dependent
vox-identityDirect workspace dependent
vox-ml-cliDirect workspace dependent
vox-orchestratorDirect workspace dependent
vox-orchestrator-mcpDirect workspace dependent
vox-orchestrator-queueDirect workspace dependent
vox-plugin-populi-meshDirect workspace dependent
vox-populiDirect workspace dependent
vox-scientiaDirect workspace dependent
vox-searchDirect workspace dependent
vox-secretsDirect workspace dependent
KindSymbolSignatureSourceDescription
fnfacades::secure_hashpub fn secure_hash(data: &[u8]) -> [u8; 32]crates/vox-crypto/src/facades.rs#L11-L15Secure cryptographic hash (BLAKE3)
fnfacades::keyed_hashpub fn keyed_hash(key: &[u8; 32], data: &[u8]) -> [u8; 32]crates/vox-crypto/src/facades.rs#L18-L22Secure keyed hash (BLAKE3 MAC)
fnfacades::fast_hashpub fn fast_hash(data: &[u8]) -> u64crates/vox-crypto/src/facades.rs#L25-L27Fast generic hashing for caches (XXH3-64)
fnfacades::hash_fast_hexpub fn hash_fast_hex(bytes: &[u8]) -> Stringcrates/vox-crypto/src/facades.rs#L41-L43Hex of the fast hash over bytes: XXH3-128, 32 lowercase hex chars. Matches format!("{h:032x}") on the raw u128 — big-endian hex of the 16-byte digest is byte-for-byte identical to that formatting. This is the single call site for both the interp’s crypto.hash_fast and native codegen’s crypto.hash_fast emit (builtin_registry.rs). It is not called by vox-actor-runtime’s vox_hash_fast (used by std.hash_fast and prompt_canonical) — that crate cannot take a normal dependency on vox-crypto without a crate-edges ledger entry, so it reimplements the same algorithm independently. Equivalence between the two is enforced by a dev-dependency test in vox-actor-runtime::builtins::tests::hash_fast_matches_vox_crypto_hash_fast_hex.
fnfacades::hex_encodepub fn hex_encode(bytes: &[u8]) -> Stringcrates/vox-crypto/src/facades.rs#L46-L54Lowercase hex encoding of an arbitrary byte slice.
fnfacades::interop_sha256pub fn interop_sha256(data: &[u8]) -> [u8; 32]crates/vox-crypto/src/facades.rs#L98-L103SHA-256, only for external formats that fix the algorithm (e.g. Trusty URIs). Vox-owned hashing uses [secure_hash] or [compliance_hash].
fnfacades::compliance_hashpub fn compliance_hash(data: &[u8]) -> [u8; 32]crates/vox-crypto/src/facades.rs#L106-L113Compliance / standardized hash (SHA-3 256)
structfacades::SymKeypub struct SymKey(pub [u8; 32])crates/vox-crypto/src/facades.rs#L116—
fnfacades::generate_sym_keypub fn generate_sym_key() -> SymKeycrates/vox-crypto/src/facades.rs#L118-L122—
fnfacades::encryptpub fn encrypt(key: &SymKey, plaintext: &[u8]) -> Result<Vec<u8>, String>crates/vox-crypto/src/facades.rs#L124-L135—
fnfacades::decryptpub fn decrypt(key: &SymKey, ciphertext: &[u8]) -> Result<Vec<u8>, String>crates/vox-crypto/src/facades.rs#L137-L143—
fnfacades::encrypt_with_noncepub fn encrypt_with_nonce(key: &SymKey, nonce: &[u8], plaintext: &[u8]) -> Result<Vec<u8>, String>crates/vox-crypto/src/facades.rs#L164-L171—
fnfacades::decrypt_with_noncepub fn decrypt_with_nonce(crates/vox-crypto/src/facades.rs#L173—
structfacades::SigningKeypub struct SigningKeycrates/vox-crypto/src/facades.rs#L188-L190—
structfacades::VerifyingKeypub struct VerifyingKeycrates/vox-crypto/src/facades.rs#L193-L195—
fnfacades::generate_signing_keypairpub fn generate_signing_keypair() -> (SigningKey, VerifyingKey)crates/vox-crypto/src/facades.rs#L209-L219—
fnfacades::signpub fn sign(key: &SigningKey, message: &[u8]) -> [u8; 64]crates/vox-crypto/src/facades.rs#L221-L224—
fnfacades::verifypub fn verify(key: &VerifyingKey, message: &[u8], sig: &[u8; 64]) -> boolcrates/vox-crypto/src/facades.rs#L226-L230—
fnfacades::signing_key_from_bytespub fn signing_key_from_bytes(bytes: &[u8; 32]) -> SigningKeycrates/vox-crypto/src/facades.rs#L232-L236—
fnfacades::signing_key_to_bytespub fn signing_key_to_bytes(key: &SigningKey) -> [u8; 32]crates/vox-crypto/src/facades.rs#L238-L240—
fnfacades::to_verifying_keypub fn to_verifying_key(signing_key: &SigningKey) -> VerifyingKeycrates/vox-crypto/src/facades.rs#L242-L246—
fnfacades::verifying_key_to_bytespub fn verifying_key_to_bytes(key: &VerifyingKey) -> [u8; 32]crates/vox-crypto/src/facades.rs#L248-L250—
fnfacades::verifying_key_from_bytespub fn verifying_key_from_bytes(bytes: &[u8; 32]) -> Result<VerifyingKey, String>crates/vox-crypto/src/facades.rs#L252-L256—
fnfacades::verify_signature_hexpub fn verify_signature_hex(crates/vox-crypto/src/facades.rs#L259Verify a signature against a hex-encoded public key and signature.
structfacades::EncryptionSecretKeypub struct EncryptionSecretKey(pub x25519_dalek::StaticSecret)crates/vox-crypto/src/facades.rs#L286—
structfacades::EncryptionPublicKeypub struct EncryptionPublicKey(pub x25519_dalek::PublicKey)crates/vox-crypto/src/facades.rs#L287—
fnfacades::generate_encryption_keypairpub fn generate_encryption_keypair() -> (EncryptionSecretKey, EncryptionPublicKey)crates/vox-crypto/src/facades.rs#L304-L308—
fnfacades::sealpub fn seal(public_key: &EncryptionPublicKey, plaintext: &[u8]) -> Result<Vec<u8>, String>crates/vox-crypto/src/facades.rs#L310-L328—
fnfacades::unsealpub fn unseal(secret_key: &EncryptionSecretKey, ciphertext: &[u8]) -> Result<Vec<u8>, String>crates/vox-crypto/src/facades.rs#L330-L350—
fnfacades::encryption_secret_key_from_bytespub fn encryption_secret_key_from_bytes(bytes: [u8; 32]) -> EncryptionSecretKeycrates/vox-crypto/src/facades.rs#L352-L354—
fnfacades::encryption_public_key_from_bytespub fn encryption_public_key_from_bytes(bytes: [u8; 32]) -> EncryptionPublicKeycrates/vox-crypto/src/facades.rs#L356-L358—
fnfacades::encryption_public_key_to_bytespub fn encryption_public_key_to_bytes(key: &EncryptionPublicKey) -> [u8; 32]crates/vox-crypto/src/facades.rs#L360-L362—