Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
use hkdf.New instead of hkdf.Expand for stateless reset key derivation
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Mar 23, 2020
1 parent a0d830e commit f05ab19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func NewTransport(key ic.PrivKey, psk pnet.PSK) (tpt.Transport, error) {
if err != nil {
return nil, err
}
keyReader := hkdf.Expand(sha256.New, keyBytes, []byte("libp2p quic stateless reset key"))
keyReader := hkdf.New(sha256.New, keyBytes, nil, []byte("libp2p quic stateless reset key"))
config.StatelessResetKey = make([]byte, 32)
if _, err := io.ReadFull(keyReader, config.StatelessResetKey); err != nil {
return nil, err
Expand Down

0 comments on commit f05ab19

Please sign in to comment.