Repository navigation
[client] Post Quantum ML-KEM rosenpass alternative #7098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
riccardomanfrin
wants to merge
124
commits into
main
Choose a base branch
from
feat-post_quantum_ml_kem
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5,525
−165
Open
Changes from all commits
Commits
Show all changes
124 commits
Select commit
Hold shift + click to select a range
c796597
ML-KEM encapsulate/decapsulate module
riccardomanfrin a48bb9b
Messages definition
riccardomanfrin 87afc3e
Pure mechanics of manager
riccardomanfrin 92cf08b
Bench key material boilerplate time/allocs
riccardomanfrin 19739b2
Admits possible errors on Encode
riccardomanfrin 311c5f8
Defines event callbacks
riccardomanfrin e4bed8d
Adds driver to glue together manager and outside world
riccardomanfrin d8fa34e
Reuse answer, don't calculate again
riccardomanfrin 75dcd57
Models reattempts
riccardomanfrin fa3c3ad
Manages convergence
riccardomanfrin 0a3dc2b
[squash] isInitial and answered can be inferred without state variables
riccardomanfrin 661926c
Collapse Driver and Manager in one.
riccardomanfrin f8bb816
Epurate wg refs
riccardomanfrin 2ed0d3b
Assume two transports: initial "signal" (control plane) one (no data …
riccardomanfrin cec4bd4
Leave signal offer/answer as a pull/push operation not as an actual t…
riccardomanfrin 0aeed6a
Removes confirm. Uses next offer to deliver confirmation/ack of previ…
riccardomanfrin 6a644df
Protocol update
riccardomanfrin 902daf6
Invert order of keys as per draft
riccardomanfrin 30212ca
Adds MLKEM Payload placeholder to client internals
riccardomanfrin 41298ac
Added enabled env var
riccardomanfrin dd5e943
Adds no-op Transports and callbacks
riccardomanfrin 077d96a
Initializes PQ ML-KEM manager
riccardomanfrin 0ae4622
Adds real callback setter for PSK on ready
riccardomanfrin 40b6a55
Ensure iface is up and with overlay ip assigned to get a valid UDP port
riccardomanfrin 6a42f7d
Communicate the port over the signal exchange
riccardomanfrin d2db1c7
Adds transport
riccardomanfrin cda3922
Makes Transport just a UDP socket.
riccardomanfrin ef29e99
Race fix
riccardomanfrin 539a1f4
Typo
riccardomanfrin 3270fc5
Bit of renaming
riccardomanfrin bac6af3
Homogeneous logs prefix
riccardomanfrin 56b315d
pqkem: dedicated slog logger via NB_PQ_MLKEM_LOG_LEVEL
riccardomanfrin 555310b
pqkem: carry KEM offer/answer over the signalling exchange
riccardomanfrin 7c276ce
pqkem: apply derived PSK at WG peer-config time (pull) + keep push fo…
riccardomanfrin e3ab585
pqkem: register data-path endpoint from signalling
riccardomanfrin 1c46b4e
pqkem: clock data-path PSK rotation from WireGuard handshakes
riccardomanfrin b92b145
Renames SetRemotePort to SetRemoteAddr
riccardomanfrin 562c02f
Adds log tracepoints
riccardomanfrin b1c0a2b
Don't rotate PQ keys if data path is idle for ~90s (less than a WG ha…
riccardomanfrin 8c8abfb
pqkem: derive PSK with HKDF-SHA256
riccardomanfrin b1b2cc1
pqkem: rotate PSK in kernel mode instead of skipping
riccardomanfrin f322be1
pqkem: strict (fail-closed) mode + wire status Quantum resistance
riccardomanfrin e1d5551
Discriminate initial from rekey failure
riccardomanfrin d485567
pqkem: recover from persistent rekey failure by re-bootstrapping over…
riccardomanfrin 63d2996
pqkem: concurrency tests (recovery + race)
riccardomanfrin d988525
Prioritize Kem over RP
riccardomanfrin bfa3652
Adds test to validate compromised keys are not accepted
riccardomanfrin 202176e
Be more explicit on names that is a fake key to ensure we don't commu…
riccardomanfrin cb5ee8e
Remove obvious comments; leave only the why of things
riccardomanfrin 5a6de00
Adds PQ connection tests
riccardomanfrin cfaf4f1
Allow non strict mode
riccardomanfrin b93e8d6
Skip default port send in signal proto
riccardomanfrin 2b27040
Anticipates PSK before WG does handshake so it finds it to set it
riccardomanfrin a78d587
Introduces a forced WG handshake on initial MLKEM bootstrap.
riccardomanfrin 3ed4b4f
Revert "Introduces a forced WG handshake on initial MLKEM bootstrap."
riccardomanfrin 4ffa2c7
Introduces a forced imparity on MLKEM bootstrap.
riccardomanfrin 1870b10
[client] pqkem: make signalling bootstrap idempotent through awaiting…
riccardomanfrin 3b61222
[client] pqkem: gate controller re-offer to kick the KEM exactly once
riccardomanfrin 4c6735e
[client] pqkem: don't let the responder's delayed update revert the PSK
riccardomanfrin 82699af
[client] pqkem: split handshaker Listen into per-message handlers
riccardomanfrin 1dc48bc
Addresses CI fixes
riccardomanfrin 11555c3
Addresses CI fixes
riccardomanfrin 8a04fa4
Addresses CI fixes
riccardomanfrin ecddbf2
Addresses CI fixes
riccardomanfrin 3efd4c9
UDPv4 is sufficient! we always have 100.x overlay. IPv6 is additive
riccardomanfrin 1ee0121
Add comment to explain working boundaries
riccardomanfrin 91f1a72
Adds observability and fixes cross cases
riccardomanfrin aca6885
[client] pqkem: enforce exchange roles and re-bootstrap stale signal …
riccardomanfrin 9ea3ddc
[client] pqkem: don't drop a responder's offer when the controller ha…
riccardomanfrin e0523ef
[client] pqkem: make exchange logs discriminate offer/answer, role, t…
riccardomanfrin 1bae44e
Merge branch 'main' into feat-post_quantum_ml_kem
riccardomanfrin dd07b12
[client] engine: extract Rosenpass and ML-KEM startup from Start
riccardomanfrin 89ec00e
[client] pqkem: address review findings on convergence, strict parsin…
riccardomanfrin a575a8f
Merge remote-tracking branch 'origin/main' into feat-post_quantum_ml_kem
riccardomanfrin 9af2788
[client] pqkem: correct the convergence-deadline comment
riccardomanfrin cc2d43e
[client] pqkem: document the real responder callback timing
riccardomanfrin 9041e9a
[client] pqkem: document rekey-failure recovery as host-defined
riccardomanfrin 5341ab0
[client] pqkem: commit the initiator PSK only after Finish succeeds
riccardomanfrin d0f7e2a
[client] pqkem: route a failed PSK application through convergence re…
riccardomanfrin 1182239
[client] pqkem: carry a generation on PSK callbacks to drop stale app…
riccardomanfrin ff634c5
[client] pqkem: don't let a superseded rotation offer revert a fresh …
riccardomanfrin 0747fa0
[client] pqkem: signal a responder failure distinctly from "no KEM"
riccardomanfrin 4eba98d
[client] pqkem: drain the data-path receive loop before clearing state
riccardomanfrin 6e0c150
[client] pqkem: drop the unused exchangeCtl.pendingPSK field
riccardomanfrin 85eaf43
[client] pqkem: mention *ErrorMsg in the Decode doc comment
riccardomanfrin 25893d2
[client] status: spell out Rosenpass in the quantum-resistance mechan…
riccardomanfrin f660e2e
[client] peer: correct the MlkemPort zero-value comment
riccardomanfrin b04c8ef
[client] pqkem: fix the capability-signal wording in a test comment
riccardomanfrin 2bb557c
[client] pqkem: preserve group scope in the slog-to-logrus handler
riccardomanfrin 50a0bfc
[client] pqkem: signal an offer-build failure with a marker, not an e…
riccardomanfrin de70516
[client] pqkem: drain in-flight signal handlers on Stop
riccardomanfrin daf9fba
[client] pqkem: document SignalOffer's error-marker return contract
riccardomanfrin 6cba403
Merge remote-tracking branch 'origin/main' into feat-post_quantum_ml_kem
riccardomanfrin 1152b25
[client] pqkem: run the data-path transport over a net.PacketConn
riccardomanfrin f669cba
[client] pqkem: bind the data-path transport on the netstack in netst…
riccardomanfrin 2a2f7a9
[client] pqkem: report a peer as quantum resistant once its PSK lands
riccardomanfrin a73ce11
[client] pqkem: bind the configured pre-shared key into the PQ PSK
riccardomanfrin b10fc22
[client] pqkem: route PSK commits and data-path sends through helpers
riccardomanfrin 1345107
[client] pqkem: authenticate data-path messages under the shared PSK
riccardomanfrin c1118f6
[client] build the lazy peer config in one place
riccardomanfrin 3cfc5c8
[client] pqkem: install strict-mode keys on idle lazy peers
riccardomanfrin 5f3f5d5
[client] pqkem: re-bootstrap over Signal only while the peer is conne…
riccardomanfrin 92764d8
[client] pqkem: keep rotating after a rotation times out
riccardomanfrin e9a622c
[client] pqkem: apply PSK generations to WireGuard in order
riccardomanfrin d0e8c4e
[client] pqkem: name the post-quantum recovery path for what it does
riccardomanfrin 2853a16
[client] pqkem: answer every responder offer with a fresh KEM bootstrap
riccardomanfrin aa9141c
[client] pqkem: make weak tests fail on the regressions they name
riccardomanfrin fb6e955
[client] pqkem: cover the env flags, signal port, offer marker and st…
riccardomanfrin 4eaa57e
[client] pqkem: wake status subscribers when a peer turns quantum res…
riccardomanfrin ebeebe0
[client] pqkem: drop the previous PSKs on Stop
riccardomanfrin 2c2f684
[client] pqkem: test the controller reoffer through the handshaker
riccardomanfrin e5764dd
[client] Raise the wasm size limit to 64 MB
riccardomanfrin 50afdff
[client] pqkem: answer an unreadable offer with an error marker
riccardomanfrin 70e6ce1
[client] pqkem: reprogram the latest PSK after a stale WireGuard conf…
riccardomanfrin 95a976d
[client] pqkem: leave a responder offer unanswered during an offer glare
riccardomanfrin 3a6e634
[client] pqkem: resend the in-flight KEM offer during an offer glare
riccardomanfrin c7971e8
Merge remote-tracking branch 'origin/main' into feat-post_quantum_ml_kem
riccardomanfrin 442b3b4
[client] pqkem: take the netstack type from wgbackend
riccardomanfrin 2069329
[client] pqkem: check the glare resend carries the in-flight offer
riccardomanfrin b776157
[client] pqkem: follow a peer's ML-KEM capability in both directions
riccardomanfrin e825ebd
[client] pqkem: warn about a failed key exchange only for a connected…
riccardomanfrin 0677e23
[client] Extract the overlay UDP accept rule from the Rosenpass firew…
riccardomanfrin 4afc71e
[client] pqkem: accept the ML-KEM data-path port in the firewall
riccardomanfrin 7ef0fef
Merge branch 'main' into feat-post_quantum_ml_kem
riccardomanfrin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rosenpass gets an inbound UDP accept rule in
initFirewall, guarded bye.rpManager != nil. ML-KEM disables Rosenpass, so nothing opens this port and rotation offers can be dropped by the peer ACLs. Needs a check under a restrictive policy, then the same accept rule for the PQ port.