Skip to content

rust: reject non-contributory Noise DH - #2199

Merged
benma merged 1 commit into
BitBoxSwiss:masterfrom
benma-agent:benma-agent/noise-contributory-check
Nov 12, 2026
Merged

benma merged 1 commit into
BitBoxSwiss:masterfrom
benma-agent:benma-agent/noise-contributory-check

Conversation

@benma-agent

Copy link
Copy Markdown
Contributor

Low-order X25519 public keys yield an all-zero shared secret. Accepting
them lets a host complete Noise XX with a static identity that proves no
private-key possession. Once approved, that identity can be reused to
skip pairing verification.

Reject non-contributory DH results before they enter the Noise key
schedule. This also rejects previously remembered weak identities
before the remembered-host lookup.

Reset the Noise state on response-writing errors as well as read errors.
The new DH failure can occur while writing the responder's first message;
retaining that partially advanced state would allow further handshake
processing after rejection.

@benma
benma requested a review from cedwies November 10, 2026 11:41
@benma
benma marked this pull request as ready for review November 10, 2026 11:41
Low-order X25519 public keys yield an all-zero shared secret. Accepting
them lets a host complete Noise XX with a static identity that proves no
private-key possession. Once approved, that identity can be reused to
skip pairing verification.

Reject non-contributory DH results before they enter the Noise key
schedule. This also rejects previously remembered weak identities
before the remembered-host lookup.

Reset the Noise state on response-writing errors as well as read errors.
The new DH failure can occur while writing the responder's first message;
retaining that partially advanced state would allow further handshake
processing after rejection.
@benma-agent
benma-agent force-pushed the benma-agent/noise-contributory-check branch from 2e56f7a to 7f0dde2 Compare November 11, 2026 15:20

@cedwies cedwies left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@benma
benma merged commit 325d681 into BitBoxSwiss:master Nov 12, 2026
104 of 106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants