go/src/crypto
Filippo Valsorda c21ba09bcd crypto/tls: implement TLS 1.3 server handshake (base)
Implement a basic TLS 1.3 server handshake, only enabled if explicitly
requested with MaxVersion.

This CL intentionally leaves for future CLs:
  - PSK modes and resumption
  - client authentication
  - compatibility mode ChangeCipherSpecs
  - early data skipping
  - post-handshake messages
  - downgrade protection
  - KeyLogWriter support
  - TLS_FALLBACK_SCSV processing

It also leaves a few areas up for a wider refactor (maybe in Go 1.13):
  - the certificate selection logic can be significantly improved,
    including supporting and surfacing signature_algorithms_cert, but
    this isn't new in TLS 1.3 (see comment in processClientHello)
  - handshake_server_tls13.go can be dried up and broken into more
    meaningful, smaller functions, but it felt premature to do before
    PSK and client auth support
  - the monstrous ClientHello equality check in doHelloRetryRequest can
    get both cleaner and more complete with collaboration from the
    parsing layer, which can come at the same time as extension
    duplicates detection

Updates #9671

Change-Id: Id9db2b6ecc2eea21bf9b59b6d1d9c84a7435151c
Reviewed-on: https://go-review.googlesource.com/c/147017
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
2018-11-02 22:07:43 +00:00
..
aes crypto/aes: remove redundant nil check around loop 2018-10-17 01:28:58 +00:00
cipher crypto/cipher: add VSX implementation of xorBytes for ppc64x 2018-11-01 15:56:48 +00:00
des crypto: panic on illegal input and output overlap 2018-06-19 21:06:50 +00:00
dsa crypto: randomly read an extra byte of randomness in some places. 2018-06-07 15:09:25 +00:00
ecdsa crypto/ecdsa: add a package level example 2018-08-02 22:14:25 +00:00
elliptic crypto/elliptic: implement P256 for arm64 2018-07-19 18:40:51 +00:00
hmac all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
internal crypto: panic on illegal input and output overlap 2018-06-19 21:06:50 +00:00
md5 crypto/md5: simplify generic implementation 2018-11-02 11:45:09 +00:00
rand crypto: add AIX operating system 2018-10-10 14:55:17 +00:00
rc4 crypto/rc4: remove assembler implementations 2018-08-21 19:49:06 +00:00
rsa all: use strings.ReplaceAll and bytes.ReplaceAll where applicable 2018-09-26 22:14:25 +00:00
sha1 all: this big patch remove whitespace from assembly files 2018-10-03 15:28:51 +00:00
sha256 all: use internal/cpu feature variables directly 2018-08-20 14:47:07 +00:00
sha512 crypto, internal/cpu: fix s390x AES feature detection and update SHA implementations 2018-06-11 11:41:31 +00:00
subtle crypto/subtle: simplify and speed up constant-time primitives 2017-11-10 03:47:57 +00:00
tls crypto/tls: implement TLS 1.3 server handshake (base) 2018-11-02 22:07:43 +00:00
x509 crypto/tls,crypto/x509: normalize RFC references 2018-10-17 03:58:03 +00:00
crypto.go crypto: add BLAKE2b and BLAKE2s hash constants 2017-03-01 19:26:16 +00:00
issue21104_test.go crypto/{aes,cipher,rc4}: fix out of bounds write in stream ciphers 2017-08-09 04:17:51 +00:00