MCPcopy Create free account
hub / github.com/XTLS/Go / trafficKey

Method trafficKey

key_schedule.go:76–80  ·  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

74
75// trafficKey generates traffic keys according to RFC 8446, Section 7.3.
76func (c *cipherSuiteTLS13) trafficKey(trafficSecret []byte) (key, iv []byte) {
77 key = c.expandLabel(trafficSecret, "key", nil, c.keyLen)
78 iv = c.expandLabel(trafficSecret, "iv", nil, aeadNonceLength)
79 return
80}
81
82// finishedHash generates the Finished verify_data or PskBinderEntry according
83// 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

expandLabelMethod · 0.95

Tested by

no test coverage detected