Tls12Prf.deriveMasterSecret

ubyte[] deriveMasterSecret(const(ubyte)[] preMasterSecret, const(ubyte)[] clientRandom, const(ubyte)[] serverRandom)

Derives the master secret from the pre-master secret.

master_secret = PRF(pre_master_secret, "master secret", ClientHello.random + ServerHello.random)[0..47]

Parameters

preMasterSecretThe pre-master secret (48 bytes for RSA, 32 for ECDHE).
clientRandomThe ClientHello.random (32 bytes).
serverRandomThe ServerHello.random (32 bytes).

Returns

The 48-byte master secret.