change the label and the context of HKDF-Expand-Label

This now uses the draft-14 test vectors from the QUIC WG wiki.
This commit is contained in:
Marten Seemann
2018-09-27 18:44:18 -06:00
parent 99c5d0df25
commit 3516780264
3 changed files with 21 additions and 21 deletions

View File

@@ -27,9 +27,9 @@ func newNullAEADAESGCM(connectionID protocol.ConnectionID, pers protocol.Perspec
}
func computeSecrets(connID protocol.ConnectionID) (clientSecret, serverSecret []byte) {
handshakeSecret := hkdfExtract(crypto.SHA256, connID, quicVersion1Salt)
clientSecret = hkdfExpandLabel(crypto.SHA256, handshakeSecret, "client hs", crypto.SHA256.Size())
serverSecret = hkdfExpandLabel(crypto.SHA256, handshakeSecret, "server hs", crypto.SHA256.Size())
initialSecret := hkdfExtract(crypto.SHA256, connID, quicVersion1Salt)
clientSecret = hkdfExpandLabel(crypto.SHA256, initialSecret, "client in", crypto.SHA256.Size())
serverSecret = hkdfExpandLabel(crypto.SHA256, initialSecret, "server in", crypto.SHA256.Size())
return
}