deriveKey
fn
ubyte[] deriveKey(const(ubyte)[] sharedSecretMpint,
in ubyte[32] exchangeHash, in ubyte[32] sessionId,
char letterOne, size_t length)Derives directional key material with the SSH KDF.
K1 = HASH(K || H || letter || session_id) and Kn = HASH(K || H || K1 || ... || Kn-1) until length bytes exist; sharedSecretEncoded supplies the wire-encoded shared secret (raw bytes in a length-prefixed string, matching the deployed curve25519 behaviour).
Parameters
sharedSecretMpint | The wire-encoded shared secret K. |
exchangeHash | The exchange hash H. |
sessionId | The session identifier. |
letterOne | KDF selector byte, 'A' through 'F'. |
length | Number of bytes required. |
Returns
The derived key material.