wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
Loading...
Searching...
No Matches
suitehash.h File Reference

RFC 8446 B.4 / 7.1: the hash a TLS 1.3 cipher suite runs its key schedule, transcript and Finished MAC over (SHA-256 for 0x1301/0x1303, SHA-384 for 0x1302). More...

Go to the source code of this file.

Data Structures

struct  tls_hash
 One suite's hash and the HKDF/HMAC instantiated over it. More...

Macros

#define TLS_HASH_MAX   HKDF_PRK_384
 Largest Hash.length of any supported suite (SHA-384).

Functions

const tls_hash * tls_hash_of (u16 suite)
 The hash for suite: SHA-384 for TLS_AES_256_GCM_SHA384, SHA-256 for every other value (including 0, the default of a zeroed struct).

Detailed Description

RFC 8446 B.4 / 7.1: the hash a TLS 1.3 cipher suite runs its key schedule, transcript and Finished MAC over (SHA-256 for 0x1301/0x1303, SHA-384 for 0x1302).

Every secret is Hash.length bytes.

Function Documentation

◆ tls_hash_of()

const tls_hash * tls_hash_of ( u16 suite)

The hash for suite: SHA-384 for TLS_AES_256_GCM_SHA384, SHA-256 for every other value (including 0, the default of a zeroed struct).

Parameters
suiteRFC 8446 B.4 cipher suite code point
Returns
the suite's hash descriptor (never NULL).