1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! The shepherd — the integrity-verification seam (L2↔L3).
//!
//! "Nothing enters the fold unverified." A [`Verifier`] checks read-only data
//! against a trusted root as it is read, turning a read-only reader into a
//! *trusted* one. Block-level verification is the primitive; file-level and
//! whole-image (dm-verity / fs-verity / composefs) verification compose on top.
//!
//! The substrate ships the no-op [`NoVerifier`] (for SB-off / unverified media); the
//! real fs-verity / dm-verity / composefs verifiers land with `lamfold-erofs`
//! built on a native Merkle over RustCrypto `sha2`. The seam exists from
//! day one so they drop in without re-architecting the frontends.
use crateResult;
use crateNodeId;
/// Verifies a block of read-only data against a trusted integrity root.
///
/// A frontend calls [`Verifier::verify_block`] for each data/metadata block it
/// surfaces; `Ok(())` means the bytes match the trusted Merkle/hash tree, an
/// `Err(FoldError::VerifyFailed)` means tampering and the read must be refused.
/// The no-op verifier: accepts everything. Used when the medium has no trust
/// root (Secure Boot off, or a frontend without an integrity story yet).
;