MCPcopy
hub / github.com/XTLS/REALITY / finishedHash

Method finishedHash

key_schedule.go:37–42  ·  view source on GitHub ↗

finishedHash generates the Finished verify_data or PskBinderEntry according to RFC 8446, Section 4.4.4. See sections 4.4 and 4.2.11.2 for the baseKey selection.

(baseKey []byte, transcript hash.Hash)

Source from the content-addressed store, hash-verified

35// to RFC 8446, Section 4.4.4. See sections 4.4 and 4.2.11.2 for the baseKey
36// selection.
37func (c *cipherSuiteTLS13) finishedHash(baseKey []byte, transcript hash.Hash) []byte {
38 finishedKey := tls13.ExpandLabel(c.hash.New, baseKey, "finished", nil, c.hash.Size())
39 verifyData := hmac.New(c.hash.New, finishedKey)
40 verifyData.Write(transcript.Sum(nil))
41 return verifyData.Sum(nil)
42}
43
44// exportKeyingMaterial implements RFC5705 exporters for TLS 1.3 according to
45// RFC 8446, Section 7.5.

Callers 5

readServerFinishedMethod · 0.80
sendClientFinishedMethod · 0.80
checkForResumptionMethod · 0.80
sendServerFinishedMethod · 0.80
sendSessionTicketsMethod · 0.80

Calls 4

ExpandLabelFunction · 0.92
SizeMethod · 0.80
WriteMethod · 0.65
SumMethod · 0.45

Tested by

no test coverage detected