boringssl/include/openssl
David Benjamin 4298d77379 Implement draft-ietf-tls-curve25519-01 in C.
The new curve is not enabled by default.

As EC_GROUP/EC_POINT is a bit too complex for X25519, this introduces an
SSL_ECDH_METHOD abstraction which wraps just the raw ECDH operation. It
also tidies up some of the curve code which kept converting back and
force between NIDs and curve IDs. Now everything transits as curve IDs
except for API entry points (SSL_set1_curves) which take NIDs. Those
convert immediately and act on curve IDs from then on.

Note that, like the Go implementation, this slightly tweaks the order of
operations. The client sees the server public key before sending its
own. To keep the abstraction simple, SSL_ECDH_METHOD expects to
generate a keypair before consuming the peer's public key. Instead, the
client handshake stashes the serialized peer public value and defers
parsing it until it comes time to send ClientKeyExchange. (This is
analogous to what it was doing before where it stashed the parsed peer
public value instead.)

It still uses TLS 1.2 terminology everywhere, but this abstraction should also
be compatible with TLS 1.3 which unifies (EC)DH-style key exchanges.
(Accordingly, this abstraction intentionally does not handle parsing the
ClientKeyExchange/ServerKeyExchange framing or attempt to handle asynchronous
plain RSA or the authentication bits.)

BUG=571231

Change-Id: Iba09dddee5bcdfeb2b70185308e8ab0632717932
Reviewed-on: https://boringssl-review.googlesource.com/6780
Reviewed-by: Adam Langley <agl@google.com>
2015-12-22 21:51:30 +00:00
..
aead.h Point EVP_aead_chacha20_poly1305 at the standardized version. 2015-12-16 21:22:11 +00:00
aes.h Fix documentation typo. 2015-07-01 21:33:29 +00:00
arm_arch.h Allow ARM capabilities to be set at compile time. 2015-10-20 22:40:15 +00:00
asn1_mac.h Ditch remaining filename comments from public headers and ssl/ 2015-10-20 18:40:05 +00:00
asn1.h Remove ASN1_R_MALLOC_FAILURE. 2015-12-22 00:12:24 +00:00
asn1t.h Ditch remaining filename comments from public headers and ssl/ 2015-10-20 18:40:05 +00:00
base64.h Deprecate basically the entire base64 implementation. 2015-09-28 21:53:39 +00:00
base.h Define BORINGSSL_201510. 2015-11-06 21:44:17 +00:00
bio.h Use typedef names, not struct names. 2015-11-06 21:44:06 +00:00
blowfish.h Add decrepit, initially containing CAST and Blowfish. 2015-04-06 16:58:45 -07:00
bn.h Convert ssl3_send_client_key_exchange to CBB. 2015-12-22 17:00:56 +00:00
buf.h Get rid of err function codes. 2015-07-16 02:02:08 +00:00
buffer.h Add buffer.h for compatibility. 2015-05-12 00:09:57 +00:00
bytestring.h Rewrite ssl3_send_server_key_exchange to use CBB. 2015-12-22 17:23:58 +00:00
cast.h Add decrepit, initially containing CAST and Blowfish. 2015-04-06 16:58:45 -07:00
chacha.h Change |CRYPTO_chacha_20| to use 96-bit nonces, 32-bit counters. 2015-10-26 23:58:46 +00:00
cipher.h Fix up several comments and detect problems in the future. 2015-11-05 20:12:45 +00:00
cmac.h Style: fix some header guards 2015-10-26 18:47:51 +00:00
conf.h Get rid of err function codes. 2015-07-16 02:02:08 +00:00
cpu.h Allow |CRYPTO_is_NEON_capable| to be known at compile time, if possible. 2015-11-19 00:15:11 +00:00
crypto.h Add no-op functions |CRYPTO_malloc_init| and |ENGINE_load_builtin_engines|. 2015-10-27 16:41:40 +00:00
curve25519.h Add #defines for ED25519 key and signature lengths. 2015-12-22 16:06:07 +00:00
des.h Fix shared library build on OS X. 2015-10-26 23:39:47 +00:00
dh.h Remove the CRYPTO_EX_new callback. 2015-12-15 21:29:46 +00:00
digest.h Documentation typo. 2015-09-28 22:18:40 +00:00
dsa.h Remove the CRYPTO_EX_new callback. 2015-12-15 21:29:46 +00:00
dtls1.h Opaquify DTLS structs. 2015-05-08 18:02:02 +00:00
ec_key.h Remove the CRYPTO_EX_new callback. 2015-12-15 21:29:46 +00:00
ec.h Add |EC_GROUP_get0_order| to replace |EC_GROUP_get_order|. 2015-12-15 18:18:13 +00:00
ecdh.h Clean up |ECDH_compute_key|. 2015-10-27 17:00:25 +00:00
ecdsa.h Fix up several comments and detect problems in the future. 2015-11-05 20:12:45 +00:00
engine.h Unwind DH_METHOD and DSA_METHOD. 2015-11-03 22:54:36 +00:00
err.h Fix up several comments and detect problems in the future. 2015-11-05 20:12:45 +00:00
evp.h Remove DH EVP_PKEY hooks. 2015-12-16 17:38:06 +00:00
ex_data.h Skip free callbacks on empty CRYPTO_EX_DATAs. 2015-12-15 21:32:14 +00:00
hkdf.h Get rid of err function codes. 2015-07-16 02:02:08 +00:00
hmac.h Remove HMAC_CTX_set_flags. 2015-06-02 01:07:07 +00:00
lhash_macros.h Remove hash table lookups from ex_data. 2015-04-15 23:59:35 +00:00
lhash.h Style: fix some header guards 2015-10-26 18:47:51 +00:00
md4.h Store the partial block as uint8_t, not uint32_t. 2015-12-16 19:59:29 +00:00
md5.h Store the partial block as uint8_t, not uint32_t. 2015-12-16 19:59:29 +00:00
mem.h Fix some typos in license headers. 2015-07-29 19:23:51 +00:00
obj_mac.h Allocate a NID for X25519. 2015-12-22 18:56:53 +00:00
obj.h Fix up several comments and detect problems in the future. 2015-11-05 20:12:45 +00:00
objects.h Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
opensslfeatures.h Remove remaining remnants of RIPEMD-160 support. 2015-03-17 21:03:42 +00:00
opensslv.h Get version-related functions from crypto.h rather than ssl.h. 2015-05-20 22:58:14 +00:00
ossl_typ.h Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
pem.h Resolve a few old TODOs. 2015-12-22 00:14:35 +00:00
pkcs7.h Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
pkcs8.h Add |PKCS12_verify_mac|. 2015-09-29 20:30:35 +00:00
pkcs12.h Move public headers to include/openssl/ 2014-07-14 22:42:18 +00:00
poly1305.h Fix several minor points noticed by Kenny. 2015-09-24 22:08:50 +00:00
pqueue.h Export pqueue functions. 2014-09-03 21:38:19 +00:00
rand.h Make RAND_seed read a byte of random data. 2015-11-16 21:58:46 +00:00
rc4.h Fix up whitespace in headers for doc.go. 2015-04-08 17:32:55 -07:00
rsa.h Simplify RSA key exchange padding check. 2015-12-22 00:10:14 +00:00
safestack.h Rename safe_stack.h to safestack.h. 2015-02-20 23:33:48 +00:00
sha.h Store the partial block as uint8_t, not uint32_t. 2015-12-16 19:59:29 +00:00
srtp.h Fold srtp.h into ssl.h. 2015-09-14 23:59:37 +00:00
ssl3.h Remove SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER. 2015-12-15 19:14:00 +00:00
ssl.h Implement draft-ietf-tls-curve25519-01 in C. 2015-12-22 21:51:30 +00:00
stack_macros.h Remove stack macros for nonexistent types. 2015-12-22 00:12:38 +00:00
stack.h Remove stack macros for nonexistent types. 2015-12-22 00:12:38 +00:00
thread.h Readd CRYPTO_{LOCK|UNLOCK|READ|WRITE}. 2015-05-27 15:48:29 -07:00
time_support.h Style: fix some header guards 2015-10-26 18:47:51 +00:00
tls1.h Implement draft-ietf-tls-chacha20-poly1305-04. 2015-12-16 23:34:56 +00:00
type_check.h Try to fix MSVC and __STDC_VERSION__ again. 2015-05-20 13:42:12 -07:00
x509_vfy.h Remove the CRYPTO_EX_new callback. 2015-12-15 21:29:46 +00:00
x509.h Resolve a few old TODOs. 2015-12-22 00:14:35 +00:00
x509v3.h Get rid of err function codes. 2015-07-16 02:02:08 +00:00