diff --git a/README.md b/README.md index 92f73cdfbf..fcbe7851d9 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,13 @@ -# Go Cryptography +# golang-x-crypto -[![Go Reference](https://pkg.go.dev/badge/golang.org/x/crypto.svg)](https://pkg.go.dev/golang.org/x/crypto) +This is a temporary dev fork of Go's `golang.org/x/crypto` module, +but only for `ssh` development. -This repository holds supplementary Go cryptography libraries. +The only thing expected to work is `go test ./ssh/...`. Other packages +will have broken package references. -## Download/Install +# Contributing -The easiest way to install is to run `go get -u golang.org/x/crypto/...`. You -can also manually git clone the repository to `$GOPATH/src/golang.org/x/crypto`. +PRs not welcome here. This is where we temporarily put patches we're +working on getting upstream ourselves. -## Report Issues / Send Patches - -This repository uses Gerrit for code changes. To learn how to submit changes to -this repository, see https://golang.org/doc/contribute.html. - -The main issue tracker for the crypto repository is located at -https://github.com/golang/go/issues. Prefix your issue with "x/crypto:" in the -subject line, so it is easy to find. - -Note that contributions to the cryptography package receive additional scrutiny -due to their sensitive nature. Patches may take longer than normal to receive -feedback. diff --git a/chacha20/chacha_generic.go b/chacha20/chacha_generic.go index a2ecf5c325..8949eaccb3 100644 --- a/chacha20/chacha_generic.go +++ b/chacha20/chacha_generic.go @@ -12,7 +12,7 @@ import ( "errors" "math/bits" - "golang.org/x/crypto/internal/subtle" + "github.com/tailscale/golang-x-crypto/internal/subtle" ) const ( diff --git a/go.mod b/go.mod index 525ffa6a94..65e7e0ae93 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module golang.org/x/crypto +module github.com/tailscale/golang-x-crypto go 1.17 @@ -8,4 +8,7 @@ require ( golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 ) -require golang.org/x/text v0.3.6 // indirect +require ( + golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 // indirect + golang.org/x/text v0.3.6 // indirect +) diff --git a/go.sum b/go.sum index cccfa807ac..88fc95cff8 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 h1:S25/rfnfsMVgORT4/J61MJ7rdyseOZOyvLIrZEZ7s6s= +golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/ssh/cipher.go b/ssh/cipher.go index f8bdf4984c..e38f0b36c7 100644 --- a/ssh/cipher.go +++ b/ssh/cipher.go @@ -17,8 +17,8 @@ import ( "io" "io/ioutil" - "golang.org/x/crypto/chacha20" - "golang.org/x/crypto/internal/poly1305" + "github.com/tailscale/golang-x-crypto/chacha20" + "golang.org/x/crypto/poly1305" ) const ( diff --git a/ssh/cipher_test.go b/ssh/cipher_test.go index 610982807d..bfb059d032 100644 --- a/ssh/cipher_test.go +++ b/ssh/cipher_test.go @@ -12,8 +12,8 @@ import ( "io" "testing" + "github.com/tailscale/golang-x-crypto/internal/poly1305" "golang.org/x/crypto/chacha20" - "golang.org/x/crypto/internal/poly1305" ) func TestDefaultCiphersExist(t *testing.T) { diff --git a/ssh/keys.go b/ssh/keys.go index 1c7de1a6dd..303e0b5c74 100644 --- a/ssh/keys.go +++ b/ssh/keys.go @@ -26,8 +26,8 @@ import ( "math/big" "strings" + "github.com/tailscale/golang-x-crypto/ssh/internal/bcrypt_pbkdf" "golang.org/x/crypto/ed25519" - "golang.org/x/crypto/ssh/internal/bcrypt_pbkdf" ) // Public key algorithms names. These values can appear in PublicKey.Type,