ddn.net.ssh.kex_group14
Diffie-Hellman group14 SHA-256 key-exchange math: SSH group14 parameters, exponent generation, peer-value validation helpers, and the DH exchange-hash transcript (RFC 4253 section 7.2 and 8, RFC 3526 section 3).
All functions are pure computations over supplied values; the message flow that produces the inputs lives in the session's key-exchange phase. Secret-bearing generation and agreement are delegated to ddn.crypto.kex.dh.DH, which blinds the private exponent per call; see generateGroup14Private and the qualification notes there.
Functions 13
fn
bool isGroup14Kex(scope const(char)[] name) pure nothrow @safe @nogcWhether a negotiated KEX name selects the group14 SHA-256 method.fn
ubyte[] group14Public(BigInt x, Random rng = new SecureRandom())Computes the group14 public value for a private exponent.fn
bool group14PeerValueValid(scope const(ubyte)[] value)Validates a peer public value per RFC 4253 section 8.fn
DHPublicKey group14PeerKey(scope const(ubyte)[] magnitude)Wraps a peer public value as a group14 key after validation.fn
ubyte[32] computeExchangeHashGroup14(
scope const SshExchangeTranscript transcript)Computes the exchange hash for diffie-hellman-group14-sha256.private fn
SshExchangeTranscript group14ReferenceTranscript(
scope const(ubyte)[] sharedSecret)Builds the reference transcript used by the group14 vector tests.Variables 6
enumvar
GROUP14_SHA256_NAME = "diffie-hellman-group14-sha256"SSH wire name of the group14 SHA-256 key exchange.
private var
ubyte[256] katE1private var
ubyte[256] katF1private var
ubyte[256] katK1private var
ubyte[32] katHash2private var
ubyte[32] katHash3