From 949f00cebe9a40c7454bc42acaa77fdb8bf6c4e6 Mon Sep 17 00:00:00 2001
From: Filippo Valsorda
- (*Conn).HandshakeContext was added to - allow the user to control cancellation of an in-progress TLS Handshake. - The context provided is propagated into the - ClientHelloInfo - and CertificateRequestInfo - structs and accessible through the new - (*ClientHelloInfo).Context - and - - (*CertificateRequestInfo).Context - methods respectively. Canceling the context after the handshake has finished - has no effect. -
- -
- When Config.NextProtos is set, servers now
- enforce that there is an overlap between the configured protocols and the protocols
- advertised by the client, if any. If there is no overlap the connection is closed
- with the no_application_protocol
alert, as required by RFC 7301.
-
@@ -424,13 +400,117 @@ Do not send CLs removing the interior tags from such phrases. -
+ The crypto/ed25519
package has been rewritten, and all
+ operations are now approximately twice as fast on amd64 and arm64.
+ The observable behavior has not otherwise changed.
+
+ CurveParams
+ methods now automatically invoke faster and safer dedicated
+ implementations for known curves (P-224, P-256, and P-521) when
+ available. Note that this is a best-effort approach and applications
+ should avoid using the generic, not constant-time CurveParams
+ methods and instead use dedicated
+ Curve
implementations
+ such as P256
.
+
+ The P521
curve
+ implementation has been rewritten using code generated by the
+ fiat-crypto project,
+ which is based on a formally-verified model of the arithmetic
+ operations. It is now constant-time and three times faster on amd64 and
+ arm64. The observable behavior has not otherwise changed.
+
+ The crypto/rand
package now uses the getentropy
+ syscall on macOS and the getrandom
syscall on Solaris,
+ Illumos, and DragonFlyBSD.
+
- TODO: https://golang.org/cl/302230: fix salt length calculation with PSSSaltLengthAuto +
+ The new Conn.HandshakeContext
+ method allows the user to control cancellation of an in-progress TLS
+ handshake. The provided context is accessible from various callbacks through the new
+ ClientHelloInfo.Context
and
+ CertificateRequestInfo.Context
+ methods. Canceling the context after the handshake has finished has no effect.
+
+ When Config.NextProtos
+ is set, servers now enforce that there is an overlap between the
+ configured protocols and the protocols advertised by the client, if any.
+ If there is no overlap the connection is closed with the
+ no_application_protocol
alert, as required by RFC 7301.
+
+ Cipher suite ordering is now handled entirely by the
+ crypto/tls
package. Currently, cipher suites are sorted based
+ on their security, performance, and hardware support taking into account
+ both the local and peer's hardware. The order of the
+ Config.CipherSuites
+ field is now ignored, as well as the
+ Config.PreferServerCipherSuites
+ field. Note that Config.CipherSuites
still allows
+ applications to choose what TLS 1.0â1.2 cipher suites to enable.
+
+ The 3DES cipher suites have been moved to
+ InsecureCipherSuites
+ due to fundamental block size-related
+ weakness. They are still enabled by default but only as a last resort,
+ thanks to the cipher suite ordering change above.
+
+ CreateCertificate
+ now returns an error if the provided private key doesn't match the
+ parent's public key, if any. The resulting certificate would have failed
+ to verify.
+
+ The temporary GODEBUG=x509ignoreCN=0
flag has been removed.
+
+ ParseCertificate
+ has been rewritten, and now consumes ~70% fewer resources. The observable
+ behavior has not otherwise changed, except for error messages.
+
+ On BSD systems, /etc/ssl/certs
is now searched for trusted
+ roots. This adds support for the new system trusted certificate store in
+ FreeBSD 12.2+.