ddn.net.ssh.kexinit
SSH_MSG_KEXINIT construction, parsing, and algorithm negotiation (RFC 4253 section 7.1, RFC 8308, strict KEX).
The client appends the RFC 8308 ext-info-c indicator and the strict-KEX marker to its key-exchange list; neither is ever selectable as the actual algorithm. Negotiation picks the first client preference the server also lists, skipping indicator names, and fails closed when any category has no match.
Types 3
Pseudo-algorithm indicators carried inside kex_algorithms.
A parsed SSH_MSG_KEXINIT.
rawPayload preserves the exact payload bytes (including the message-number byte) for the exchange-hash transcript.
ubyte[16] cookiestring[] kexstring[] hostKeystring[] cipherC2Sstring[] cipherS2Cstring[] macC2Sstring[] macS2Cstring[] compressionC2Sstring[] compressionS2Cstring[] languagesC2Sstring[] languagesS2Cbool firstKexPacketFollowsconst(ubyte)[] rawPayloadOutcome of algorithm negotiation plus extension signalling.
Functions 13
bool isCurve25519Kex(scope const(char)[] name) pure nothrow @safe @nogcWhether a KEX name selects the curve25519-sha256 method.ubyte[] buildKexInitPayload(const SshAlgorithmPreferences prefs,
in ubyte[16] cookie, bool strictKex = true) @safeBuilds the client's KEXINIT payload.SshNegotiationResult negotiate(const SshKexInit client,
const SshKexInit server) @safeNegotiates algorithms from the client's and server's KEXINIT.bool serverAdvertisesStrictKex(scope const SshKexInit server) @safe pure nothrowWhether a server KEXINIT advertises the strict-KEX server marker.string negotiateKexName(scope const SshKexInit client,
scope const SshKexInit server) @safeNegotiates only the key-exchange name from both KEXINITs.string firstKexAlgorithm(scope const SshKexInit server) @safe pure nothrowReturns the server's actual guessed key exchange.string firstHostKeyAlgorithm(scope const SshKexInit server) @safe pure nothrowReturns the server host-key algorithm covered by a speculative first key-exchange packet.string matchSkippingIndicators(scope const string[] client,
scope const string[] server) @safeSshKexInit parseRoundTrip(const SshAlgorithmPreferences prefs,
bool strictKex = true) @safeVariables 1
CURVE25519_SHA256_LIBSSH = "curve25519-sha256@libssh.org"Compatibility alias selecting the same key exchange as curve25519-sha256 (OpenSSH and libssh wire name).