profile: gate the legacy prf fallback on LEGACY_SIGS #195

Owner

Follow-up to #193 (t_438331aa). profile::verify was the last site still accepting the untagged v1 layout unconditionally.

Change

  • src/profile.rs: the legacy branch is now v2 || (crate::pay::legacy_sigs() && v1), the same shape as loc::verify. Emit side untouched: profile::sign still tags.
  • tests/app_sig.rs: adds legacy_off_rejects_untagged_prf (untagged rejected with legacy off, tagged still verifies, acceptance returns after the scoped override). legacy_untagged_prf_still_verifies stays green.
  • docs/PROTOCOL.md: the prf row now reads "(legacy only)" like the other frames; the "not yet gated" paragraph and the note in the prf section are gone.

No change to the prf tag string, frame layout, or the LEGACY_SIGS default (true).

Verification

  • cargo test --locked --target x86_64-unknown-linux-gnu — full suite green (exit 0).
  • cargo clippy --locked --all-targets --target x86_64-unknown-linux-gnu -- -D warnings — green.
  • legacy_untagged_prf_still_verifies ... ok, legacy_off_rejects_untagged_prf ... ok.

Base

#193 is still open, so this targets onionwire/t_438331aa-close-the-legacy-signature-surface-and-d. Rebase to main once #193 merges.

Note: the LEGACY_SIGS doc comment in src/pay.rs still says "(prf is not yet gated)". That file was explicitly out of scope on this card; it is a one-line comment cleanup for whoever touches it next.

Follow-up to #193 (t_438331aa). `profile::verify` was the last site still accepting the untagged v1 layout unconditionally. ## Change - `src/profile.rs`: the legacy branch is now `v2 || (crate::pay::legacy_sigs() && v1)`, the same shape as `loc::verify`. Emit side untouched: `profile::sign` still tags. - `tests/app_sig.rs`: adds `legacy_off_rejects_untagged_prf` (untagged rejected with legacy off, tagged still verifies, acceptance returns after the scoped override). `legacy_untagged_prf_still_verifies` stays green. - `docs/PROTOCOL.md`: the `prf ` row now reads "(legacy only)" like the other frames; the "not yet gated" paragraph and the note in the `prf` section are gone. No change to the `prf` tag string, frame layout, or the `LEGACY_SIGS` default (`true`). ## Verification - `cargo test --locked --target x86_64-unknown-linux-gnu` — full suite green (exit 0). - `cargo clippy --locked --all-targets --target x86_64-unknown-linux-gnu -- -D warnings` — green. - `legacy_untagged_prf_still_verifies` ... ok, `legacy_off_rejects_untagged_prf` ... ok. ## Base #193 is still open, so this targets `onionwire/t_438331aa-close-the-legacy-signature-surface-and-d`. Rebase to `main` once #193 merges. Note: the `LEGACY_SIGS` doc comment in `src/pay.rs` still says "(`prf` is not yet gated)". That file was explicitly out of scope on this card; it is a one-line comment cleanup for whoever touches it next.
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
237f0abced
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.
sirius merged commit 8375bfc5e5 into onionwire/t_438331aa-close-the-legacy-signature-surface-and-d 2026-10-26 18:14:21 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/onionwire!195
No description provided.