X-Git-Url: http://www.git.cypherpunks.ru/?p=govpn.git;a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgovpn%2Fpeer.go;h=213e8174786df4db45d72abfa40a20043851b9a4;hp=5a620a9c76692d23536aa87d0c6fabc770795fac;hb=da9420230cd4ed2ff1d8685c96b99043e529da62;hpb=696d610336e0cf8cecc40ec94c138bec8cc42afa diff --git a/src/cypherpunks.ru/govpn/peer.go b/src/cypherpunks.ru/govpn/peer.go index 5a620a9..213e817 100644 --- a/src/cypherpunks.ru/govpn/peer.go +++ b/src/cypherpunks.ru/govpn/peer.go @@ -28,7 +28,7 @@ import ( "sync/atomic" "time" - "github.com/dchest/blake2b" + "golang.org/x/crypto/blake2b" "golang.org/x/crypto/poly1305" "golang.org/x/crypto/salsa20" ) @@ -52,7 +52,10 @@ const ( func newNonces(key *[32]byte, i uint64) chan *[NonceSize]byte { macKey := make([]byte, 32) salsa20.XORKeyStream(macKey, make([]byte, 32), make([]byte, 8), key) - mac := blake2b.NewMAC(NonceSize, macKey) + mac, err := blake2b.New256(macKey) + if err != nil { + panic(err) + } nonces := make(chan *[NonceSize]byte, NonceBucketSize*3) go func() { for {