Skip to content

Pin the v1 wire-format fixtures with worked-example signatures #5

@sanity

Description

@sanity

Problem

freenet-git-encoding has worked-example tests that lock the byte format of length-prefixed signed payloads and canonical CBOR for bundle ids. The ref-update fixture currently asserts that signing+verifying works, but does not pin the resulting ed25519 signature bytes against a known test key.

Pinning the signature bytes makes the wire format binding for any independent implementation: a Go or TypeScript port that produces a different signature for the same logical inputs immediately fails the cross-implementation conformance suite.

What needs to happen

In crates/encoding/src/signed.rs, ref_update_signs_and_verifies test:

  • Compute the actual signature once and lock it as a hex constant.
  • Add the same fixture for the object-bundle and string-field signed payloads.
  • Move them into a fixtures.rs module documented as "the wire-format pin."

A change in any of those expected hex constants is a wire-format break and must come together with a v1 -> v2 domain bump.

[AI-assisted - Claude]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions