Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto/tls: TLS_ECDHE_*_WITH_CHACHA20_POLY1305 constants are misnamed #32061

Open
jrwren opened this issue May 15, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@jrwren
Copy link

commented May 15, 2019

What version of Go are you using (go version)?

$ go version
1.12

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/jrwren/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/jrwren/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/dx/1319ml391vqcwyncfz2vf6t80000gn/T/go-build976546411=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Tried to use crypto/tls with RFC standard names.

What did you expect to see?

RFC & IANA standard names.

What did you see instead?

https://github.com/golang/go/blob/master/src/crypto/tls/cipher_suites.go#L461
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 and TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305

Both https://www.iana.org/assignments/tls-parameters/tls-parameters.xml and RFC7905 refer to these as TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 and TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 respectfully.

Maybe this is too nit-picky, but I spent enough time double checking that they are the same. I'd like to spare the next person from any confusion.

Is it OK to send a patch to add the missing _SHA256 suffixes to those constants?

@FiloSottile

This comment has been minimized.

Copy link
Member

commented May 15, 2019

Unfortunately, the Go 1 Compatibility Promise prevents us from updating the constant. I would accept a CL documenting the mistake though. Also, the API in #30325 should return the correct name.

@FiloSottile FiloSottile added this to the Go1.13 milestone May 15, 2019

@FiloSottile FiloSottile changed the title TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 constant should be named TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 crypto/tls: TLS_ECDHE_*_WITH_CHACHA20_POLY1305 constants are misnamed May 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.