ddn.net.ssh.kex_ecdh
SSH ECDH over NIST P-256 (RFC 5656): wire-name selection, uncompressed-point validation, and independent transcript vectors.
P-256 uses the same SSH transcript shape as curve25519: the client and server public values enter as strings, while the x-coordinate shared secret enters as an mpint. Therefore computeExchangeHash, sharedSecretEncoded, and deriveKey are shared with ddn.net.ssh.kex_curve.
The primitive validates peer points before scalar multiplication, uses the constant-work scalar multiplication path in ddn-crypto, and exposes explicit scalar cleanup through EcdhP256.wipe.
Functions 5
fn
bool isEcdhP256Kex(scope const(char)[] name) pure nothrow @safe @nogcWhether a KEX name selects ECDH over NIST P-256.fn
bool decodeEcdhP256Point(scope const(ubyte)[] encoded,
out ubyte[32] x, out ubyte[32] y)Decodes and validates an RFC 5656 P-256 public point.private fn
SshExchangeTranscript referenceTranscript(
scope const(ubyte)[] clientPoint,
scope const(ubyte)[] serverPoint,
scope const(ubyte)[] sharedSecret)Variables 1
enumvar
ECDH_P256_NAME = "ecdh-sha2-nistp256"SSH wire name of ECDH over NIST P-256 with SHA-256.