profile: gate the legacy prf fallback on LEGACY_SIGS
All checks were successful
ci / test (pull_request) Successful in 19m37s
ci / sdk (pull_request) Successful in 2m19s

profile::verify accepted the untagged v1 layout unconditionally, the last
v1 site outside the pay::LEGACY_SIGS switch. Short-circuit it the same way
loc::verify does; emit side is unchanged and still tags.

PROTOCOL.md drops the 'not yet gated' caveats so prf reads like the other
frames. Adds legacy_off_rejects_untagged_prf alongside the other
legacy_off_rejects_untagged_* tests.
This commit is contained in:
agent 2026-10-22 22:44:12 -04:00
commit 237f0abced
No known key found for this signature in database
3 changed files with 48 additions and 13 deletions

View file

@ -329,7 +329,7 @@ sent, and a peer cannot negotiate it.
| --- | --- | --- |
| invite | `onionwire-invite-v2`, `0x00`-separated over `k`, `o`, `spk`, `kem` | same; `onionwire:v1` over `onionwire-invite-v1` `0x00`-separated `k`,`o`,`spk`, or over `k \|\| o \|\| spk` (legacy only) |
| `loc ` | `"onionwire-loc-v1"` `0x00` `onion` `0x00` `ts` | same; `onion \|\| LF \|\| ts` (legacy only) |
| `prf ` | `"onionwire-prf-v1"` `0x00` `name` `0x00` `bio` `0x00` `xmr_addr` `0x00` `ts` | same; the four fields joined by LF (not yet gated — see below) |
| `prf ` | `"onionwire-prf-v1"` `0x00` `name` `0x00` `bio` `0x00` `xmr_addr` `0x00` `ts` | same; the four fields joined by LF (legacy only) |
| `inv ` | `"onionwire-inv-v1"` `0x00` `amount_atomic` `0x00` `address` `0x00` `memo` `0x00` `ts` | same; the four fields joined by LF (legacy only) |
| `rcp ` | `"onionwire-rcp-v1"` `0x00` `txid` `0x00` `amount_atomic` `0x00` `address` `0x00` `ts` | same; the four fields joined by LF (legacy only) |
| `tip ` | `"onionwire-tip-v1"` `0x00` `txid` `0x00` `amount_atomic` `0x00` `address` `0x00` `memo` `0x00` `ts` | same; the five fields joined by LF (legacy only) |
@ -337,10 +337,6 @@ sent, and a peer cannot negotiate it.
The tag suffixes do say `-v1`; that is the tag's own version, not the invite
string version.
`prf ` is the one frame whose legacy fallback is not yet gated: it is accepted
unconditionally in this revision and moving it under `LEGACY_SIGS` is a
separate change.
**Mixed-fleet consequence.** Older builds verify only the untagged bytes, so
they reject every tagged signature from a new sender — including `tip `, which
older builds emitted and verified untagged. That direction needs the peer
@ -401,8 +397,8 @@ ed25519_sign(identity_sk,
```
**Legacy accept:** a signature over the four fields joined by LF is still
accepted on verify. New profile frames MUST use the domain-separated form.
Do not emit legacy. This fallback is not yet read through `LEGACY_SIGS`.
accepted on verify while `LEGACY_SIGS` is on. New profile frames MUST use the
domain-separated form. Do not emit legacy.
Apply only for an existing friend, valid signature, newer `ts`. Not a public
profile. Not a directory.