MCPcopy Index your code
hub / github.com/XTLS/REALITY / trafficKey

Method trafficKey

key_schedule.go:28–32  ·  view source on GitHub ↗

trafficKey generates traffic keys according to RFC 8446, Section 7.3.

(trafficSecret []byte)

Source from the content-addressed store, hash-verified

26
27// trafficKey generates traffic keys according to RFC 8446, Section 7.3.
28func (c *cipherSuiteTLS13) trafficKey(trafficSecret []byte) (key, iv []byte) {
29 key = tls13.ExpandLabel(c.hash.New, trafficSecret, "key", nil, c.keyLen)
30 iv = tls13.ExpandLabel(c.hash.New, trafficSecret, "iv", nil, aeadNonceLength)
31 return
32}
33
34// finishedHash generates the Finished verify_data or PskBinderEntry according
35// to RFC 8446, Section 4.4.4. See sections 4.4 and 4.2.11.2 for the baseKey

Callers 1

setTrafficSecretMethod · 0.80

Calls 1

ExpandLabelFunction · 0.92

Tested by

no test coverage detected