code: func keysFromMasterSecret(version uint16, suite *cipherSuite, masterSecret, clientRandom, serverRandom []byte, macLen, keyLen, ivLen int) (clientMAC, serverMAC, clientKey, serverKey, clientIV, serverIV []byte) {
  	seed := make([]byte, 0, len(serverRandom)+len(clientRandom))
  	seed = append(seed, serverRandom...)
  	seed = append(seed, clientRandom...)
  
  	n := 2*macLen + 2*keyLen + 2*ivLen
  	keyMaterial := make([]byte, n)
  	prfForVersion(version, suite)(keyMaterial, masterSecret, keyExpansionLabel, seed)
  	clientMAC = keyMaterial[:macLen]
  	keyMaterial = keyMaterial[macLen:]
  	serverMAC = keyMaterial[:macLen]
  	keyMaterial = keyMaterial[macLen:]
  	clientKey = keyMaterial[:keyLen]
  	keyMaterial = keyMaterial[keyLen:]
  	serverKey = keyMaterial[:keyLen]
  	keyMaterial = keyMaterial[keyLen:]
  	clientIV = keyMaterial[:ivLen]
  	keyMaterial = keyMaterial[ivLen:]
  	serverIV = keyMaterial[:ivLen]
  	return
  }
docs: // keysFromMasterSecret generates the connection keys from the master
  // secret, given the lengths of the MAC key, cipher key and IV, as defined in
  // RFC 2246, section 6.3.