Skip to content

M1: Domain-separated hash contexts for core commitments (state_root/patch_digest/commit_id) #185

Description

@flyingrobots

Pulse context: domain separation + belt-and-suspenders hashing. We are OK with breaking hashes (2026-01-02 discussion).

Goal

  • Switch security-critical digests in warp-core to BLAKE3 derive-key contexts so the same bytes hashed under the wrong function cannot accidentally collide across domains.

Scope

  • state_root: introduce explicit version tag (v1) and compute using derive-key context (e.g. ECHO/warp-core/state_root/v1).
  • patch_digest: bump to v3 (hash mode change) and compute using derive-key context (e.g. ECHO/warp-core/patch_digest/v3).
  • commit_id: bump to v3 and compute using derive-key context (e.g. ECHO/warp-core/commit_hash/v3).
  • Centralize the domain strings and hasher constructors in one module to prevent future footguns.

Acceptance criteria

  • Tests prove: hashing the same canonical byte stream under different domains yields different digests.
  • Specs/docs updated to name the new versions and contexts.
  • Any golden vectors/fixtures updated accordingly.

Notes

  • This should land before we treat hash goldens as stable (M1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreEcho Core TechnologiesruntimeRuntime coresecuritySecurity

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions