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 Allow .arch directives with Clang. 2016-08-26 17:45:49 +00:00
asn1 Remove trailing ';' from macros 2016-09-12 19:17:26 +00:00
base64 Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
bio Implement BIO_eof() for compatibility 2016-09-13 23:52:14 +00:00
bn Define __STDC_CONSTANT_MACROS in bn_test.cc. 2016-09-19 15:28:12 +00:00
buf Add BUF_MEM_reserve. 2016-05-18 19:09:06 +00:00
bytestring Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
chacha Use fewer macros in C ChaCha implementation. 2016-09-13 01:56:09 +00:00
cipher Add EVP_AEAD_CTX_aead. 2016-09-17 01:06:40 +00:00
cmac Replace Scoped* heap types with bssl::UniquePtr. 2016-09-01 22:22:54 +00:00
conf
curve25519 Replace Scoped* heap types with bssl::UniquePtr. 2016-09-01 22:22:54 +00:00
des
dh Fold stack-allocated types into headers. 2016-09-07 21:50:05 +00:00
digest Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
dsa Add various 1.1.0 accessors. 2016-08-10 16:52:15 +00:00
ec Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
ecdh Replace Scoped* heap types with bssl::UniquePtr. 2016-09-01 22:22:54 +00:00
ecdsa Replace Scoped* heap types with bssl::UniquePtr. 2016-09-01 22:22:54 +00:00
engine Remove trailing ';' from macros 2016-09-12 19:17:26 +00:00
err Only predict X25519 in TLS 1.3. 2016-09-21 21:18:34 +00:00
evp Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
hkdf Adding ARRAY_SIZE macro for getting the size of constant arrays. 2016-08-19 19:30:39 +00:00
hmac Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
lhash Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
md4
md5 Switch perlasm calling convention. 2016-06-27 21:59:26 +00:00
modes Move gcm_test to C++ 2016-09-14 16:51:56 +00:00
newhope Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
obj Rename the |dont_return_name| flag of |OBJ_obj2txt| to |always_return_oid|. 2016-08-10 17:18:25 +00:00
pem Reject inappropriate private key encryption ciphers. 2016-05-03 16:30:08 +00:00
perlasm Remove unused crypto/perlasm/cbc.pl. 2016-09-12 19:03:57 +00:00
pkcs8 Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
poly1305 Resolve a small handful of size_t truncation warnings. 2016-08-05 19:12:31 +00:00
rand Resolve a small handful of size_t truncation warnings. 2016-08-05 19:12:31 +00:00
rc4 Simplify RC4 code and remove assembly. 2016-08-30 15:32:31 +00:00
rsa Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
sha sha/asm/sha1-x86_64.pl: fix crash in SHAEXT code on Windows. 2016-08-16 19:46:06 +00:00
stack Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
test Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
x509 Shush a MinGW warning in crypto/x509. 2016-09-20 22:26:27 +00:00
x509v3 Finish aligning up_ref functions with OpenSSL 1.1.0. 2016-08-11 16:51:52 +00:00
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 Wrap MSVC-only warning pragmas in a macro. 2016-06-09 21:29:36 +00:00
crypto.c Add no-op function ENGINE_register_all_complete. 2016-07-12 17:54:41 +00:00
ex_data.c Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
internal.h Use pthreads on MinGW. 2016-09-20 22:25:14 +00:00
mem.c Breaking news: 1998 has come and gone. 2016-07-11 23:51:47 +00:00
refcount_c11.c
refcount_lock.c Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
refcount_test.c
thread_none.c Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
thread_pthread.c Use pthreads on MinGW. 2016-09-20 22:25:14 +00:00
thread_test.c Wrap MSVC-only warning pragmas in a macro. 2016-06-09 21:29:36 +00:00
thread_win.c Use pthreads on MinGW. 2016-09-20 22:25:14 +00:00
thread.c Remove a bunch of unnecessary includes. 2016-06-28 20:31:14 +00:00
time_support.c