Skip to content

node: initiator outbound handshake (WHOAREYOU → HANDSHAKE)#27

Merged
ch4r10t33r merged 1 commit into
mainfrom
feat/outbound-initiator
May 10, 2026
Merged

node: initiator outbound handshake (WHOAREYOU → HANDSHAKE)#27
ch4r10t33r merged 1 commit into
mainfrom
feat/outbound-initiator

Conversation

@ch4r10t33r

Copy link
Copy Markdown
Owner

Implements issue #17: start a session as initiator with allocOpeningPingHandshake (random throwaway key on the first ordinary), match WHOAREYOU by echoed message nonce, derive keys, sign identity proof, send HANDSHAKE (empty inner message for now), and cache the session with peer_handshake_initiator = false.

Adds packet.writeWhoareyouChallengeData for the HKDF salt buffer.

Test: full open → WAY → HS → post-handshake encrypted ping/pong.

Closes #17.

- Track pending opens with echoed message nonce; allocOpeningPingHandshake
- handleReceive processes WHOAREYOU for initiator and emits HANDSHAKE + session
- packet.writeWhoareyouChallengeData for HKDF salt buffer
- Integration test: open → WAY → HS → encrypted ping/pong

Closes #17.
@ch4r10t33r ch4r10t33r merged commit 2bb36e8 into main May 10, 2026
1 check 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.

discv5: initiator / outbound path

1 participant