mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-06 14:47:35 +03:00
Update deps
This commit is contained in:
parent
ac395b03fc
commit
d85214252a
8 changed files with 58 additions and 146 deletions
6
vendor/github.com/aead/chacha20/chacha/chacha.go
generated
vendored
6
vendor/github.com/aead/chacha20/chacha/chacha.go
generated
vendored
|
@ -55,7 +55,7 @@ func setup(state *[64]byte, nonce, key []byte) (err error) {
|
|||
|
||||
copy(hNonce[:], nonce[:16])
|
||||
copy(tmpKey[:], key)
|
||||
hChaCha20(&tmpKey, &hNonce, &tmpKey)
|
||||
HChaCha20(&tmpKey, &hNonce, &tmpKey)
|
||||
copy(Nonce[8:], nonce[16:])
|
||||
initialize(state, tmpKey[:], &Nonce)
|
||||
|
||||
|
@ -174,3 +174,7 @@ func (c *Cipher) SetCounter(ctr uint64) {
|
|||
}
|
||||
c.off = 0
|
||||
}
|
||||
|
||||
// HChaCha20 generates 32 pseudo-random bytes from a 128 bit nonce and a 256 bit secret key.
|
||||
// It can be used as a key-derivation-function (KDF).
|
||||
func HChaCha20(out *[32]byte, nonce *[16]byte, key *[32]byte) { hChaCha20(out, nonce, key) }
|
||||
|
|
6
vendor/github.com/aead/chacha20/chacha/chacha_go17_amd64.go
generated
vendored
6
vendor/github.com/aead/chacha20/chacha/chacha_go17_amd64.go
generated
vendored
|
@ -9,7 +9,7 @@ package chacha
|
|||
func init() {
|
||||
useSSE2 = true
|
||||
useSSSE3 = supportsSSSE3()
|
||||
useAVX2 = supportsAVX2()
|
||||
useAVX2 = supportsAVX2() && false // disable until #16 is fixed
|
||||
}
|
||||
|
||||
// This function is implemented in chacha_amd64.s
|
||||
|
@ -53,7 +53,7 @@ func hChaCha20(out *[32]byte, nonce *[16]byte, key *[32]byte) {
|
|||
hChaCha20AVX(out, nonce, key)
|
||||
} else if useSSSE3 {
|
||||
hChaCha20SSSE3(out, nonce, key)
|
||||
} else if useSSE2 { // on amd64 this is always true - neccessary for testing generic on amd64
|
||||
} else if useSSE2 { // on amd64 this is always true - necessary for testing generic on amd64
|
||||
hChaCha20SSE2(out, nonce, key)
|
||||
} else {
|
||||
hChaCha20Generic(out, nonce, key)
|
||||
|
@ -65,7 +65,7 @@ func xorKeyStream(dst, src []byte, block, state *[64]byte, rounds int) int {
|
|||
return xorKeyStreamAVX2(dst, src, block, state, rounds)
|
||||
} else if useSSSE3 {
|
||||
return xorKeyStreamSSSE3(dst, src, block, state, rounds)
|
||||
} else if useSSE2 { // on amd64 this is always true - neccessary for testing generic on amd64
|
||||
} else if useSSE2 { // on amd64 this is always true - necessary for testing generic on amd64
|
||||
return xorKeyStreamSSE2(dst, src, block, state, rounds)
|
||||
}
|
||||
return xorKeyStreamGeneric(dst, src, block, state, rounds)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue