hekate-sha2
Copyright (c) 2026 Andrei Kochergin and Oumuamua Labs.
SHA-256 in zero knowledge for Hekate, the Rust zero-knowledge proof engine. A chiplet
proves the 64 rounds of the compression function, FIPS 180-4 §6.2.2, at 1, 2, 4, 8 or 16 rounds per row. Padding
and chaining belong to the host program: pad_message pads in host code, your host table chains the blocks, and
CpuSha256Block applies the feed-forward add h_out = h_in + state_out there.
⚠️ Security Warning
This crate has not been independently audited and may contain bugs and security flaws.
Usage
SHA-256 of one message, one compression per host row, with the chiplet attached as its own table:
use Config;
use errors;
use ColumnType;
use ;
use FixedShape;
use ;
use ;
type F = Block128;
Host row b holds block.write(&mut tb, b, &calls[b]), and the two bits after the block's columns, active and
chain, are one on rows 0..blocks and 0..blocks - 1. calls[b] pairs block b of pad_message(message) with
h_in from calls[b - 1].h_out(), IV for the first, and sha.trace(&calls) is the chiplet trace.
sha256.rs is a complete program that
scales the message size.
Documentation
- SHA-256: what the proof states, padding and chaining, and proving time, proof size and memory
- RSA-2048 PKCS#1 v1.5 Verification: this chiplet hashing the signed message
- API reference
License
AGPL-3.0-only. See LICENSE and NOTICE. Commercial licenses are available from Oumuamua Labs info@oumuamua.dev.