Skip to content

P0: Specify deterministic canonicalization and evidence hashing #183

Description

@safal207

Parent: #180
Depends on: #181, #182

Objective

Define byte-stable normalization and digest rules so independent verifiers compute the same evidence identifiers.

Scope

  • canonical JSON serialization profile;
  • field inclusion and exclusion rules;
  • ordering and number/string normalization;
  • timestamp normalization;
  • domain-separated SHA-256 digests;
  • envelope root calculation;
  • artifact digest references;
  • witness statement digest;
  • verification output digest;
  • mutation and replay detection rules.

Deliverables

  • docs/POCI_CANONICALIZATION_V0_1.md
  • reference canonicalizer in Python or a thin adapter over an existing deterministic implementation
  • golden canonical JSON output
  • golden digest vectors
  • negative vectors showing one-byte mutations

Definition of done

  • Two clean executions produce identical canonical bytes and hashes.
  • Key reordering in source JSON does not change the digest.
  • Security-relevant value mutation changes the envelope root.
  • Domain separation prevents reusing one object digest as another object type.
  • Golden vectors are usable by future Rust and third-party implementations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions