hekate-crypto
Copyright (c) 2026 Andrei Kochergin and Oumuamua Labs.
Hash functions, Merkle trees and the Fiat-Shamir transcript of Hekate, the Rust zero-knowledge proof engine. A proof commits to its tables with Merkle trees and draws every challenge from the transcript, which makes the hash part of the proof: the prover and the verifier must use the same one.
⚠️ Security Warning
This crate has not been independently audited and may contain bugs and security flaws.
USE AT YOUR OWN RISK!
Usage
DefaultHasher hashes in parts, or in one call with DefaultHasher::digest:
use ;
A Merkle tree commits to leaf digests, and a path opens one leaf against the root:
use ;
use ;
use Block128;
A leaf count that is not a power of two pads with zero leaves. The padded count fixes the path length, and several leaves open with one shared set of siblings.
A transcript turns what both sides have absorbed into the same challenge, here drawn after the root:
use DefaultHasher;
use ;
use Block128;
The label keeps your application's transcripts apart from every other one, and the verifier opens its transcript with the same bytes.
Choosing the hash
| Feature | Default | DefaultHasher |
|---|---|---|
blake3 |
yes | BLAKE3 |
sha2 |
no | SHA-256 |
sha3 |
no | SHA3-256 |
Cargo enables a feature for the whole build as soon as one crate asks for it, and SHA3-256 then wins over SHA-256, which wins over BLAKE3. The prover binary and the verifier must use the same hash, or no proof verifies.
parallel (default) builds Merkle trees on a Rayon pool, and transcript-trace records every transcript operation
to locate a prover/verifier divergence.
Documentation
- Prover Engine: commit: how a proof commits to its tables
- Prover Engine: challenges: the Fiat-Shamir transcript, and how the verifier replays it
- API reference
License
AGPL-3.0-only. See LICENSE and NOTICE. Commercial licenses are available from Oumuamua Labs info@oumuamua.dev.