This chapter establishes what a TLS 1.3 connection actually requires of a cryptographic library. The purpose is not to restate the protocol, which is specified in RFC 8446, but to identify every point at which an algorithm implementation is consumed, because each such point is a place where a provider-supplied algorithm must be able to appear.
A TLS 1.3 connection is parameterised by four cryptographic choices. They are negotiated separately, they appear in different handshake messages, and — this is the observation the rest of the paper depends on — they are supplied to OpenSSL through different mechanisms.
| Decision | Negotiated by | Fixes |
|---|---|---|
| AEAD algorithm | Cipher suite | Record protection; key and IV lengths |
| Hash function | Cipher suite | Transcript hash, HKDF, all secret lengths |
| Key exchange group | supported_groups extension and key_share | The shared secret |
| Signature algorithm | signature_algorithms extension | Authentication of the handshake |
A crucial structural fact follows from the first two rows: in TLS 1.3 the cipher suite
identifier binds the AEAD algorithm and the hash together. TLS_AES_128_GCM_SHA256
is one code point naming two algorithms. This is a deliberate simplification relative to
TLS 1.2, where the suite additionally encoded the key exchange and authentication methods; in
1.3 those moved into extensions, which is precisely why groups and signature algorithms are
independently negotiable and cipher suites are not.
Verified. The coupling is visible in the OpenSSL cipher table. Each entry in
tls13_ciphers[] carries both the AEAD identifier and a handshake MAC selector; the
first entry pairs SSL_AES128GCM with SSL_HANDSHAKE_MAC_SHA256
(ssl/s3_lib.c:39–56, tree openssl-3.5.8).
Stated as a list of demands on the library rather than as a message flow, a TLS 1.3 handshake proceeds roughly as follows. The client offers cipher suites, supported groups and signature algorithms, and speculatively generates a key share for one or more groups. Generating that share is the first algorithm use: a key pair in the offered group must exist before the first flight is sent.
The server selects a suite, a group and — if it must authenticate — a signature algorithm. It generates its own key share, completes the key agreement, and from that point the key schedule begins. Every secret in TLS 1.3 is derived by HKDF using the hash bound to the selected suite, and the transcript hash over all handshake messages so far participates in those derivations. The server signs the transcript with its long-term key, and both sides compute Finished values using a MAC keyed from the schedule.
The ordering matters for a provider design in a way that is easy to miss:
ClientHello, and must be advertised in supported_groups for the server
to be able to choose it.The consequence for this paper is that the three algorithm classes in its title are not symmetric. The group must be advertised; the hash must be selectable at the moment a suite is chosen and then drives everything derived; the AEAD is comparatively self-contained.
TLS 1.3 derives all keying material through HKDF, structured as a schedule of
Extract and Expand steps. The hash function selected by the cipher
suite determines the HMAC used inside HKDF and therefore the length of every secret in the
schedule: a suite naming SHA-256 produces 32-byte secrets throughout, one naming SHA-384
produces 48-byte secrets.
This has a design consequence that is more restrictive than it first appears. Introducing a new hash function into TLS is not merely adding an implementation; it changes the width of the key schedule. Every buffer, every derived secret, every Finished value and every exporter output takes its length from that hash. An implementation that assumed 32 or 48 bytes — in the TLS stack, in an application's exporter usage, or in a session-resumption cache — is affected by the change in a way it is not affected by a change of record cipher.
A new AEAD, by contrast, is comparatively contained. It has a key length, an IV length and a tag length; provided the record layer can learn those three values, the rest of the protocol is indifferent to which algorithm produced the ciphertext.
Design implication. A provider that supplies a hash for use as a TLS handshake hash must expose its output length through the ordinary parameter mechanism, and the consuming stack must honour it rather than assuming a constant. Chapter 15 develops this; it is the single most invasive aspect of the design.
TLS 1.3 record protection uses an AEAD interface with a per-record nonce constructed from a static IV and a sequence number. The record layer requires the following from whatever algorithm it is handed:
The last point excludes some AEAD constructions from direct use. An algorithm that insists on generating its own nonce, or that uses a nonce width incompatible with the 64-bit sequence number folded into the static IV, cannot be dropped into the TLS 1.3 record layer without adaptation. This is a constraint on algorithm choice, not on the provider mechanism, but it must be checked before a design commits to a particular cipher.
The key_share extension carries an opaque octet string whose interpretation is
defined per group. For an elliptic-curve group this is a point encoding; for a finite-field
group, an integer. The TLS stack requires of a group:
supported_groups;The last item deserves emphasis because it is where key-exchange implementations have historically failed. A group implementation that does not validate peer input — that accepts a point not on the curve, or a small-order point — introduces a vulnerability that no amount of correctness in the rest of the stack will compensate for. Chapter 17 returns to this.
The server signs a defined context string concatenated with the transcript hash, using an
algorithm named by a code point in signature_algorithms. The requirements are a
code point, an association with a key type and OID so that certificates can be matched to it,
a signing operation, a verification operation, and a statement of the security level so that
policy can rank it.
Verified. These are exactly the fields OpenSSL's capability mechanism carries.
The TLS_SIGALG_ENTRY macro builds an OSSL_PARAM array containing the
IANA name, the algorithm name, the OID, the code point and the security bits
(providers/common/capabilities.c:292–302).
Collecting the above, a provider that wishes to participate fully in a TLS 1.3 connection must be able to present, through whatever mechanism OpenSSL offers:
| Class | Must expose | Consumed at |
|---|---|---|
| AEAD | Key, IV and tag lengths; external nonce; AAD | After handshake keys exist |
| Hash | Output length; streaming update; duplication of state | From suite selection onward, retrospectively over the transcript |
| Group | Code point; share encoding; keygen; derive; peer-share validation | Before the first flight is sent |
| Signature | Code point; OID; key type; sign; verify; security bits | Server Certificate Verify |
The next chapter describes the mechanism through which a provider exposes anything at all; Chapter 4 then maps this demand surface onto it.