mirror of
https://github.com/jmcorgan/fips.git
synced 2026-10-06 03:28:24 +00:00
Carries the v0.5.3 maint batch and the master-only portable_atomic change up to next. The link and session rekey fixes from maint are written against the IK link handshake and the XK session handshake; next runs XX on both, so each was adapted or left out as follows. Previous-session link frames kept out of MMP: adapted. Both decrypt paths in the encrypted-frame handler report which session authenticated the frame, and a previous-session frame is not counted by the MMP receiver and a ReceiverReport it carries is dropped. Next has no spin bit, so that part of the change has nothing to gate. Next's initiator msg3 confirm on the same paths is left as it was. The node tests are rebuilt on next's three-message rekey: the initiator reads msg2, its msg3 is held back from the responder, and it cuts over on its own tick. Resend of a lost link rekey msg2, the per-peer record of answered msg1s, and answering msg1 on the established link: not carried. All three depend on the IK responder installing its new session when it answers msg1 and holding it until adopted. Under XX msg1 carries no identity, so the responder cannot tie a msg1 to a peer, holds nothing until an authenticated msg3 declares the rekey, and answers a duplicate msg1 from the same address with its stored msg2. A replayed msg1 cannot be carried to a msg3, since that needs the initiator's ephemeral key. The msg2 has to go to the msg1's source because the peer is not known yet. The FMP core, peer and handshake-handler changes and their tests are dropped, along with their changelog entries. Forged session msg3 and setup: the setup hold is carried. A setup naming an established peer while a handshake that peer armed awaits its msg3 is dropped and counted as rekey_held, and the dual-initiation tie-break now runs only for a handshake this node initiated, with the retry and tie-break tests updated to match. The rolling-back msg3 read targets the XK read, which next does not have; next's XX msg3 arms are left as they were here and get their own change.