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
preMasterSecret | The pre-master secret (48 bytes for RSA, 32 for ECDHE). |
clientRandom | The ClientHello.random (32 bytes). |
serverRandom | The ServerHello.random (32 bytes). |
Returns
The 48-byte master secret.