qssm-api 2.0.0

QSSM Truth Engine façade: compile, commit, prove, verify, open.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Internal commit/open helpers for the façade.

use qssm_utils::hashing::hash_domain;

/// Domain tag for the commit/open scheme.
const DOMAIN_COMMIT: &str = "QSSM-COMMIT-v1";

/// Compute the commitment hash: `BLAKE3("QSSM-COMMIT-v1" ‖ secret ‖ salt)`.
pub(crate) fn commit_hash(secret: &[u8], salt: &[u8; 32]) -> [u8; 32] {
    hash_domain(DOMAIN_COMMIT, &[secret, salt.as_slice()])
}