Describe the signature scheme in docs/FORMAT.md as the code builds it #187

Open
opened 2026-10-12 10:54:21 +02:00 by clawbot · 1 comment
Collaborator

sneak's signature ruling (#82 (comment)) settles that the code is the format and that docs/FORMAT.md is corrected to describe it. This is the signature part of #84; the rest of that issue still waits on the wire format decisions.

Where the document disagrees with the code today:

  • The Signature Scheme section says the third part of the signed string is the hex SHA-256 from the outer message. signatureString in mfer/manifest.go uses the lower-case hex of the multihash encoding of the outer sha256, so that part starts 1220. The UUID part is the lower-case hex of the 16 UUID bytes, with no hyphens.
  • It says signer holds the fingerprint "in hex"; fingerprint in mfer/openpgp.go writes upper-case hex.
  • It never says that a signature lives only inside the manifest. The signature row calls it an "OpenPGP detached signature", which reads as a separate file.
  • The mfer/mf.proto comments on fields 201 to 203 still talk about GPG and gosignify.
  • No test pins the exact string that is signed.

Definition of done

  • The Signature Scheme section states exactly what signatureString builds, part by part and encoding by encoding, with one example string produced by the code for a fixed UUID and sha256.
  • signer is described as the upper-case hex fingerprint of the signing primary key.
  • The document says the signature is stored only in the manifest's signature field, never in a separate file, and holds one OpenPGP signature over the signed string, binary or armored.
  • The mf.proto comments on fields 201 to 203 say what the fields hold now; mfer/mf.pb.go is regenerated with make generate.
  • A test checks that signatureString gives the documented example for that UUID and sha256.
  • Nothing about what is signed or how changes: documentation, proto comments and the one test only.
  • make check passes; markdown formatted with make fmt.

Model: opus-5-5

sneak's signature ruling (https://git.eeqj.de/sneak/mfer/issues/82#issuecomment-132656) settles that the code is the format and that `docs/FORMAT.md` is corrected to describe it. This is the signature part of https://git.eeqj.de/sneak/mfer/issues/84; the rest of that issue still waits on the wire format decisions. Where the document disagrees with the code today: - The Signature Scheme section says the third part of the signed string is the hex SHA-256 from the outer message. `signatureString` in `mfer/manifest.go` uses the lower-case hex of the multihash encoding of the outer `sha256`, so that part starts `1220`. The UUID part is the lower-case hex of the 16 UUID bytes, with no hyphens. - It says `signer` holds the fingerprint "in hex"; `fingerprint` in `mfer/openpgp.go` writes upper-case hex. - It never says that a signature lives only inside the manifest. The `signature` row calls it an "OpenPGP detached signature", which reads as a separate file. - The `mfer/mf.proto` comments on fields 201 to 203 still talk about GPG and `gosignify`. - No test pins the exact string that is signed. ## Definition of done - The Signature Scheme section states exactly what `signatureString` builds, part by part and encoding by encoding, with one example string produced by the code for a fixed UUID and `sha256`. - `signer` is described as the upper-case hex fingerprint of the signing primary key. - The document says the signature is stored only in the manifest's `signature` field, never in a separate file, and holds one OpenPGP signature over the signed string, binary or armored. - The `mf.proto` comments on fields 201 to 203 say what the fields hold now; `mfer/mf.pb.go` is regenerated with `make generate`. - A test checks that `signatureString` gives the documented example for that UUID and `sha256`. - Nothing about what is signed or how changes: documentation, proto comments and the one test only. - `make check` passes; markdown formatted with `make fmt`. Model: opus-5-5
clawbot self-assigned this 2026-10-12 10:54:21 +02:00
Author
Collaborator

Done in #188: the Signature Scheme section of docs/FORMAT.md and the mf.proto comments on fields 201 to 203 now describe the signature as the code builds it, with an example string that a new test checks.

Model: opus-5-5

Done in https://git.eeqj.de/sneak/mfer/pulls/188: the Signature Scheme section of `docs/FORMAT.md` and the `mf.proto` comments on fields 201 to 203 now describe the signature as the code builds it, with an example string that a new test checks. Model: opus-5-5
Sign in to join this conversation.