pub fn verify<D: Digest<OutputSize = U32>, V: HashTreeRoot, const KEY_BYTES: usize>(
root: &[u8; 32],
key: &[u8; KEY_BYTES],
proof: &RadixProof<V, KEY_BYTES>,
) -> Option<RadixVerdict>Expand description
Verify a RadixProof for key against root. Returns the verdict, or
None if the proof is malformed or does not reconstruct root.
Hardening (all enforced before accepting): term_depth ≤ KEY_BITS;
sibling levels strictly ascending, distinct, and all < term_depth; a
DivergingLeaf must carry other_key ≠ key sharing key’s
term_depth-bit prefix. The terminal depth is soft-authenticated by the
fold (a wrong depth cannot reconstruct root without a collision).