mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-04 21:57:44 +03:00
Manually pin dependency revisions
This commit is contained in:
parent
4974ce98a3
commit
8c147c7efd
29 changed files with 55 additions and 2019 deletions
32
vendor/github.com/jedisct1/dlog/Gopkg.lock
generated
vendored
32
vendor/github.com/jedisct1/dlog/Gopkg.lock
generated
vendored
|
@ -1,32 +0,0 @@
|
|||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:4d9d876a856ada3b553062ac8e50331a9a539e12893c0c4a50d8ae2af4242685"
|
||||
name = "github.com/hashicorp/go-syslog"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "326bf4a7f709d263f964a6a96558676b103f3534"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:6a6eed3727d0e15703d9e930d8dbe333bea09eda309d75a015d3c6dc4e5c92a6"
|
||||
name = "golang.org/x/sys"
|
||||
packages = [
|
||||
"windows",
|
||||
"windows/registry",
|
||||
"windows/svc/eventlog",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "b00e65af1da0681cde6c8227839a0ca53bbf16bb"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
input-imports = [
|
||||
"github.com/hashicorp/go-syslog",
|
||||
"golang.org/x/sys/windows/svc/eventlog",
|
||||
]
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
7
vendor/github.com/jedisct1/dlog/Gopkg.toml
generated
vendored
7
vendor/github.com/jedisct1/dlog/Gopkg.toml
generated
vendored
|
@ -1,7 +0,0 @@
|
|||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/hashicorp/go-syslog"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/sys"
|
8
vendor/github.com/jedisct1/dlog/go.mod
generated
vendored
Normal file
8
vendor/github.com/jedisct1/dlog/go.mod
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
module github.com/jedisct1/dlog
|
||||
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/hashicorp/go-syslog v1.0.0
|
||||
golang.org/x/sys v0.0.0-20190909082730-f460065e899a
|
||||
)
|
4
vendor/github.com/jedisct1/dlog/go.sum
generated
vendored
Normal file
4
vendor/github.com/jedisct1/dlog/go.sum
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE=
|
||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
||||
golang.org/x/sys v0.0.0-20190909082730-f460065e899a h1:mIzbOulag9/gXacgxKlFVwpCOWSfBT3/pDyyCwGA9as=
|
||||
golang.org/x/sys v0.0.0-20190909082730-f460065e899a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
4
vendor/github.com/jedisct1/go-minisign/go.mod
generated
vendored
4
vendor/github.com/jedisct1/go-minisign/go.mod
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
module github.com/jedisct1/go-minisign
|
||||
|
||||
go 1.12
|
||||
go 1.13
|
||||
|
||||
require golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480
|
||||
require golang.org/x/crypto v0.0.0-20190909091759-094676da4a83
|
||||
|
|
10
vendor/github.com/jedisct1/go-minisign/go.sum
generated
vendored
10
vendor/github.com/jedisct1/go-minisign/go.sum
generated
vendored
|
@ -1,3 +1,7 @@
|
|||
golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480 h1:O5YqonU5IWby+w98jVUG9h7zlCWCcH4RHyPVReBmhzk=
|
||||
golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
||||
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83 h1:mgAKeshyNqWKdENOnQsg+8dRTwZFIwFaO3HNl52sweA=
|
||||
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
|
6
vendor/github.com/jedisct1/xsecretbox/go.mod
generated
vendored
6
vendor/github.com/jedisct1/xsecretbox/go.mod
generated
vendored
|
@ -1,10 +1,10 @@
|
|||
module github.com/jedisct1/xsecretbox
|
||||
|
||||
go 1.12
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da
|
||||
github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635
|
||||
github.com/cloudflare/circl v0.0.0-20190621185434-0ba9a9382e8b
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83
|
||||
golang.org/x/sys v0.0.0-20190909082730-f460065e899a // indirect
|
||||
)
|
||||
|
|
15
vendor/github.com/jedisct1/xsecretbox/go.sum
generated
vendored
15
vendor/github.com/jedisct1/xsecretbox/go.sum
generated
vendored
|
@ -2,8 +2,13 @@ github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmH
|
|||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
|
||||
github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 h1:52m0LGchQBBVqJRyYYufQuIbVqRawmubW3OFGqK1ekw=
|
||||
github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635/go.mod h1:lmLxL+FV291OopO93Bwf9fQLQeLyt33VJRUg5VJ30us=
|
||||
github.com/cloudflare/circl v0.0.0-20190621185434-0ba9a9382e8b h1:yGcUL49UXXtIcd8FIkrxCZ7N96l16UM1C0VcA4UOVH4=
|
||||
github.com/cloudflare/circl v0.0.0-20190621185434-0ba9a9382e8b/go.mod h1:MhjB3NEEhJbTOdLLq964NIUisXDxaE1WkQPUxtgZXiY=
|
||||
golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc=
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83 h1:mgAKeshyNqWKdENOnQsg+8dRTwZFIwFaO3HNl52sweA=
|
||||
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190909082730-f460065e899a h1:mIzbOulag9/gXacgxKlFVwpCOWSfBT3/pDyyCwGA9as=
|
||||
golang.org/x/sys v0.0.0-20190909082730-f460065e899a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
|
|
21
vendor/github.com/jedisct1/xsecretbox/sharedkey.go
generated
vendored
21
vendor/github.com/jedisct1/xsecretbox/sharedkey.go
generated
vendored
|
@ -4,24 +4,21 @@ import (
|
|||
"errors"
|
||||
|
||||
"github.com/aead/chacha20/chacha"
|
||||
"github.com/cloudflare/circl/dh/x25519"
|
||||
"golang.org/x/crypto/curve25519"
|
||||
)
|
||||
|
||||
// SharedKey computes a shared secret compatible with the one used by `crypto_box_xchacha20poly1305``
|
||||
func SharedKey(secretKey [32]byte, publicKey [32]byte) ([32]byte, error) {
|
||||
var sharedKey [32]byte
|
||||
var cfSharedKey, cfSecretKey, cfPublicKey x25519.Key
|
||||
copy(cfSecretKey[:], secretKey[:])
|
||||
copy(cfPublicKey[:], publicKey[:])
|
||||
if !x25519.Shared(&cfSharedKey, &cfSecretKey, &cfPublicKey) {
|
||||
curve25519.ScalarMult(&sharedKey, &secretKey, &publicKey)
|
||||
c := byte(0)
|
||||
for i := 0; i < 32; i++ {
|
||||
c |= sharedKey[i]
|
||||
}
|
||||
if c == 0 {
|
||||
return sharedKey, errors.New("weak public key")
|
||||
}
|
||||
HChaCha20(&sharedKey)
|
||||
var nonce [16]byte
|
||||
chacha.HChaCha20(&sharedKey, &nonce, &sharedKey)
|
||||
return sharedKey, nil
|
||||
}
|
||||
|
||||
// HChaCha20 - Hash the result of an X25519 key exchange in order to get a box-compatible shared secret
|
||||
func HChaCha20(sharedKey *[32]byte) {
|
||||
var zeroNonce [16]byte
|
||||
chacha.HChaCha20(sharedKey, &zeroNonce, sharedKey)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue