Skip to content

Delete trust_level from client/hello instead of renaming it — the server already derives it from the matched PSK #140

Closed

Description

@balloob

Problem

The message client/hello has the field trust_level. Its values are 'user' and 'none'.

The server can calculate the same value. The server knows which PSK matched during the Noise handshake.

This table shows the full mapping:

Matched PSK Trust
Sentinel PSK unpaired
Pairing PSK unpaired, during a pairing procedure
Long-term PSK paired

Both record types give the paired result. The spec says that "every record carries user trust level".

The spec already uses this calculation. management.md says that "the client validates that the matched PSK is a Sendspin PSK (i.e. the server is paired)". The table in server/activate uses the matched PSK, not the field trust_level.

connection.md makes each psk_id unique across the three categories. The reason is important: one psk_id must not map to two trust levels.

A client cannot correctly send a different value. The Definitions section makes the trust level a result of the record. If a client removes its record, the handshake fails before client/hello.

Thus the field is a second source of truth. The spec does not tell the server what to do if the two sources disagree.

Change

Remove the field. Change these three locations:

  1. messaging.md, client/hello. Remove the field description.
  2. messaging.md, server/unpair. Change the condition to "If the matched PSK is not a long-term PSK". management.md already uses this style.
  3. connection.md, Re-handshake. Remove the text "(the client re-asserts trust_level)".

PR #138 already changes the trust-level concept to paired and unpaired in approximately 8 more locations.

Effect

The change removes one diagnostic signal. If a server uses the wrong PSK category, the value 'none' gives an early indication.

After the change, the server finds the error at the server/activate rejection. The spec defines this rejection fully.

Relation to PR #138

PR #138 changes the field to a boolean paired. This issue does more. If the server can calculate the value, the wire must not carry it.

Do one of these:

This change breaks compatibility. The effect is equal to PR #138.

Activity

  1. added a commit that references this issue on Aug 28, 2026
    7f52403
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions