boringssl/crypto
David Benjamin c8b6b4fe4a Only predict X25519 in TLS 1.3.
We'd previously been assuming we'd want to predict P-256 and X25519 but,
on reflection, that's nonsense. Although, today, P-256 is widespread and
X25519 is less so, that's not the right question to ask. Those servers
are all 1.2.

The right question is whether we believe enough servers will get to TLS
1.3 before X25519 to justify wasting 64 bytes on all other connections.
Given that OpenSSL has already shipped X25519 and Microsoft was doing
interop testing on X25519 around when we were shipping it, I think the
answer is no.

Moreover, if we are wrong, it will be easier to go from predicting one
group to two rather than the inverse (provided we send a fake one with
GREASE). I anticipate prediction-miss HelloRetryRequest logic across the
TLS/TCP ecosystem will be largely untested (no one wants to pay an RTT),
so taking a group out of the predicted set will likely be a risky
operation.

Only predicting one group also makes things a bit simpler. I haven't
done this here, but we'll be able to fold the 1.2 and 1.3 ecdh_ctx's
together, even.

Change-Id: Ie7e42d3105aca48eb9d97e2e05a16c5379aa66a3
Reviewed-on: https://boringssl-review.googlesource.com/10960
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2016-09-21 21:18:34 +00:00
..
aes
asn1
base64
bio
bn
buf
bytestring
chacha
cipher
cmac
conf
curve25519
des
dh
digest
dsa
ec
ecdh
ecdsa
engine
err
evp
hkdf
hmac
lhash
md4
md5 Switch perlasm calling convention. 2016-06-27 21:59:26 +00:00
modes
newhope
obj Rename the |dont_return_name| flag of |OBJ_obj2txt| to |always_return_oid|. 2016-08-10 17:18:25 +00:00
pem
perlasm
pkcs8
poly1305
rand Resolve a small handful of size_t truncation warnings. 2016-08-05 19:12:31 +00:00
rc4
rsa
sha sha/asm/sha1-x86_64.pl: fix crash in SHAEXT code on Windows. 2016-08-16 19:46:06 +00:00
stack
test
x509
x509v3
CMakeLists.txt Switch perlasm calling convention. 2016-06-27 21:59:26 +00:00
constant_time_test.c
cpu-aarch64-linux.c
cpu-arm-linux.c
cpu-arm.c
cpu-intel.c
crypto.c
ex_data.c
internal.h
mem.c
refcount_c11.c Cast refcounts to _Atomic before use. 2015-05-20 13:39:22 -07:00
refcount_lock.c
refcount_test.c
thread_none.c
thread_pthread.c
thread_test.c
thread_win.c
thread.c Remove a bunch of unnecessary includes. 2016-06-28 20:31:14 +00:00
time_support.c