exportKeyingMaterial implements RFC5705 exporters for TLS 1.3 according to RFC 8446, Section 7.5.
(masterSecret []byte, transcript hash.Hash)
| 92 | // exportKeyingMaterial implements RFC5705 exporters for TLS 1.3 according to |
| 93 | // RFC 8446, Section 7.5. |
| 94 | func (c *cipherSuiteTLS13) exportKeyingMaterial(masterSecret []byte, transcript hash.Hash) func(string, []byte, int) ([]byte, error) { |
| 95 | expMasterSecret := c.deriveSecret(masterSecret, exporterLabel, transcript) |
| 96 | return func(label string, context []byte, length int) ([]byte, error) { |
| 97 | secret := c.deriveSecret(expMasterSecret, label, nil) |
| 98 | h := c.hash.New() |
| 99 | h.Write(context) |
| 100 | return c.expandLabel(secret, "exporter", h.Sum(nil), length), nil |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | // ecdheParameters implements Diffie-Hellman with either NIST curves or X25519, |
| 105 | // according to RFC 8446, Section 4.2.8.2. |
no test coverage detected