Skip to content

Commit cd1bd2a

Browse files
bajtosalanshaw
authored andcommitted
fee/vectors: fix stale pin docs after master re-pin (FIL-473)
The reference pin moved to a commit reachable from master once upstream PR #2 merged, but three doc spots still described the pre-merge state and contradicted the script: they claimed master seals tag-96 bodies under the buggy "Encrypt0" context and told the reader to re-pin later, and the regeneration section still named refs/pull/2/head. Describe the pin as what it is — a fixed commit on master carrying the merged RFC 9052 5.3 fix — and keep the caveat where it belongs: commits before that fix are not comparable with these vectors. Signed-off-by: Miroslav Bajtoš <oss@bajtos.net> Assisted-by: Claude:claude-opus-5
1 parent 3e42bde commit cd1bd2a

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

fee/vectors/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ across two implementations:
77
- **TypeScript** — the reference `foc-encryption`
88
([`Kubuxu/foc-encryption-demo`](https://github.com/Kubuxu/foc-encryption-demo),
99
`packages/foc-encryption`), **pinned** in
10-
[`pull-foc-encryption.sh`](./pull-foc-encryption.sh) to the head of
11-
[PR #2](https://github.com/Kubuxu/foc-encryption-demo/pull/2)
12-
(`158571ae…`) — the RFC 9052 §5.3 fix. Master is deliberately *not* used: it
13-
still seals tag-96 bodies under the buggy `"Encrypt0"` context. Re-pin to the
14-
merge commit once the PR lands.
10+
[`pull-foc-encryption.sh`](./pull-foc-encryption.sh) to `158571ae…` on
11+
`master` — the RFC 9052 §5.3 fix, which landed upstream in
12+
[PR #2](https://github.com/Kubuxu/foc-encryption-demo/pull/2). Before that fix
13+
the reference sealed tag-96 bodies under the wrong `"Encrypt0"` context, so
14+
vectors are only comparable against this commit or later.
1515

1616
The reference is the **source of truth** for the wire format; these vectors pin
1717
to it and this repo's `fee/*` matches it (see [Wire format](#wire-format)).
@@ -77,7 +77,7 @@ FEE_VECTORS_REGEN=1 GOWORK=off go test ./fee/vectors -run TestGenerate -v
7777
```
7878

7979
`pull-foc-encryption.sh` vendors the pinned reference into `ts/vendor/`
80-
(gitignored — never committed): `git clone` + `git fetch refs/pull/2/head`,
80+
(gitignored — never committed): `git clone` + `git fetch refs/heads/master`,
8181
checking out the pinned SHA, and falling back to fetching the pinned source files
8282
from `raw.githubusercontent.com` where `git` is unavailable. It requires
8383
[`bun`](https://bun.sh) to run the TypeScript.

fee/vectors/doc.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
// foc-encryption), pinned in pull-foc-encryption.sh.
77
//
88
// The reference is the source of truth for the wire format. It is pinned (see
9-
// pull-foc-encryption.sh) to the head of foc-encryption-demo PR #2 — the fix
10-
// that makes the body AAD context follow the envelope structure per RFC 9052
11-
// §5.3 — rather than master, which still seals tag-96 bodies under "Encrypt0".
12-
// The shape, verified against the pinned commit, is:
9+
// pull-foc-encryption.sh) to a fixed commit on foc-encryption-demo master — the
10+
// merged fix (upstream PR #2) that makes the body AAD context follow the
11+
// envelope structure per RFC 9052 §5.3. Commits before that fix seal tag-96
12+
// bodies under "Encrypt0" and are not comparable with these vectors. The shape,
13+
// verified against the pinned commit, is:
1314
//
1415
// blob = envelope || ciphertext (detached payload)
1516
// envelope = 16([protected, unprotected, null]) for no recipients

0 commit comments

Comments
 (0)