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

Closed
jrwren opened this issue May 15, 2019 · 2 comments
Closed

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

jrwren opened this issue May 15, 2019 · 2 comments
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Unfortunate
Milestone

Comments

@jrwren
Copy link

jrwren 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
Copy link
Contributor

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 Documentation NeedsFix The path to resolution is known, but the work has not been done. Unfortunate labels May 15, 2019
@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
@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
@FiloSottile FiloSottile modified the milestones: Backlog, Go1.14 Oct 23, 2019
@gopherbot
Copy link

Change https://golang.org/cl/205068 mentions this issue: crypto/tls: add correct names for CHACHA20_POLY1305 cipher suite constants

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Unfortunate
Projects
None yet
Development

No branches or pull requests

5 participants