fix nonce usage in the AEAD, use the AEAD provided by qtls for Initials

This commit is contained in:
Marten Seemann
2019-01-06 10:56:33 +07:00
parent 2cb72ad098
commit b4356d7348
6 changed files with 23 additions and 49 deletions

View File

@@ -419,7 +419,6 @@ func (h *cryptoSetup) SetReadKey(suite *qtls.CipherSuite, trafficSecret []byte)
}
opener := newOpener(
suite.AEAD(key, iv),
iv,
hpDecrypter,
h.readEncLevel == protocol.Encryption1RTT,
)
@@ -449,7 +448,6 @@ func (h *cryptoSetup) SetWriteKey(suite *qtls.CipherSuite, trafficSecret []byte)
}
sealer := newSealer(
suite.AEAD(key, iv),
iv,
hpEncrypter,
h.writeEncLevel == protocol.Encryption1RTT,
)