Run hybrid handshakes: v3 holders initiate them, responders wait for msg3, initiators resend it until confirmed

This commit is contained in:
JackDoan committed 2026-10-14 11:03:04 -05:00
1 parent 5c5254dc18
commit b26c1e9c3e
8 files changed
+913 -36

No files matched your search

+8
View File
@@ -92,6 +92,14 @@ func (cs *ConnectionState) NextMessageCounter() (uint64, bool) {
return c, true
}
// heardFromPeer reports whether anything from the peer has decrypted under these
// keys, beyond the handshake messages the replay window was seeded with.
func (cs *ConnectionState) heardFromPeer(handshakeMessages uint64) bool {
cs.decryptLock.Lock()
defer cs.decryptLock.Unlock()
return cs.window.current > handshakeMessages
}
func (cs *ConnectionState) Curve() cert.Curve {
return cs.myCert.Curve()
}