projection only.Expand description
Projectable self-authenticating records with projection soundness. Merkle membership proofs for projectable binary records.
verify binds the proof’s disclosed fields to a trusted external anchor.
verify_query also requires exactly the caller’s field IDs; missing fields
are rejected, not proven absent. verify_untrusted checks consistency only.
Security assumes BLAKE3 collision resistance, a trusted anchor, and a canonical source record. Hashes are not mathematical injective functions. Omitted payloads and their current storage contents are not inspected by a partial verifier. Payload semantics remain the application’s responsibility.
Field framing is field_id: u32 LE, length: u32 LE, then opaque bytes,
with strictly increasing IDs. Domain-separated leaf and parent hashes bind
the fields; a domain-separated outer hash binds the schema version.
For n fields and k disclosed fields, proofs contain O(k log(n/k) + k) sibling hashes. Verification also reads the disclosed payload and uses BTreeMap bookkeeping. Proof construction scans the record and builds an O(n)-space tree; these are not constant-memory or sublinear construction APIs.
Structs§
- Projection
- A projection query: an ordered set of field identifiers.
- Projection
Limits - Resource policy applied before allocation or parsing of projection data.
- Projection
Proof - A self-contained projection proof (witness) for a query.
- Proof
Leaf - One field extracted by a proof, before type-specific decoding.
- Proof
Sibling - One sibling hash needed to reconstruct the Merkle root.
- Record
- A parsed, validated self-authenticating record.
- Record
Builder - Canonical builder for self-authenticating records.
- Verified
Field - A field whose authenticity and value were verified against the anchor.
Enums§
- Projection
Error - Errors produced by the projection format.
Constants§
- DEFAULT_
MAX_ FIELDS - Default maximum number of fields in one record.
- DEFAULT_
MAX_ PAYLOAD_ LEN - Default maximum payload length of one field.
- DEFAULT_
MAX_ RECORD_ LEN - Default maximum serialized record length.
Functions§
- prove
- Parses and proves in one step.
- schema_
root - Schema-binding root:
H(SCHEMA_DOMAIN ‖ schema_version ‖ merkle_root). - verify
- Verifies a proof against a trusted anchor and returns the queried fields.
- verify_
query - Verifies membership against a trusted anchor and requires exactly the caller’s requested field IDs. A missing field is rejected: this format carries membership proofs, not authenticated absence proofs.
- verify_
untrusted - Verifies a proof for internal consistency only.
Type Aliases§
- FieldId
- Stable application field identifier inside one record.