Skip to main content

metadata_blob_hash_matches

Function metadata_blob_hash_matches 

Source
pub fn metadata_blob_hash_matches(
    committed: Option<Hash32>,
    metadata_blob: &[u8],
) -> bool
Expand description

Invariant 25 (key-free): the metadata blob in the bundle has a content hash equal to the manifest’s committed metadata_blob_hash. The server holds no key, but it hashes the ciphertext object it stores and compares it against the signed manifest field, so a client cannot present a metadata blob different from the one its manifest is signed over. false when the manifest commits to no hash — a bundle carrying a blob must be committed to.

This is the value half of the client-side round-trip check (verify_metadata_binding); the server never decrypts, so it checks only the content address.