Skip to main content

verify_record_proof

Function verify_record_proof 

Source
pub fn verify_record_proof(
    commit: &Commit,
    signing_key: &VerifyingKey,
    path: &Proof,
    record: &ModelRecord,
) -> Result<()>
Expand description

verifyRecordProof(commit, signingKey, path, record) — offline D5 verification.

Checks, in order:

  1. Commit signature: commit is signed by signing_key (the account’s published #atproto P-256 verifying key).
  2. MST path: path is a valid inclusion proof from the commit’s data (MST root) down to an entry whose value is the record’s CID.
  3. Record CID: the record’s computed CID equals the entry value the path addresses.

If all three pass, the host’s claim (“this account’s repo contains this record at this MST root, signed by this DID”) is trustworthy without needing to trust the host.