You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delete trust_level from client/hello instead of renaming it — the server already derives it from the matched PSK #140
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:
messaging.md, client/hello. Remove the field description.
messaging.md, server/unpair. Change the condition to "If the matched PSK is not a long-term PSK". management.md already uses this style.
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.
Activity
Delete `trust_level` from `client/hello` (Sendspin#158)