Skip to main content

attestation_commitment

Function attestation_commitment 

Source
pub fn attestation_commitment(
    scheme: u32,
    key_id: &[u8],
    genesis_commitment: Word,
    public_key: &[u8],
    next_key: Option<&NextTransactionEncryptionKey>,
) -> Word
Expand description

Computes the commitment a validator signs to attest an encryption key.

Mirrors the validator’s attestation_commitment (signers::attestation_commitment in the miden-validator crate of 0xMiden/node) so the layout is duplicated here and pinned against the validator’s output by the golden-vector tests below: the Poseidon2 hash of ATTESTATION_DOMAIN || scheme || len(key_id) || key_id || genesis_commitment || len(public_key) || public_key || next_key_transcript, where the scheme, rotation block number and length prefixes are 4 bytes little-endian. The length prefixes keep the payload injective, and the genesis commitment ties the attestation to one chain. Any divergence from the validator’s layout makes every signature fail to verify.