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

RFC 9001 4.1.2: after the client Finished verifies, the server completes the handshake: derive the application (1-RTT) secrets from the transcript including the client Finished, install the 1-RTT key set, and mark the handshake confirmed. More...

Go to the source code of this file.

Data Structures

struct  quic_srvfin_state
 Server handshake-completion state. More...

Functions

void quic_srvfin_state_init (quic_srvfin_state *s, quic_keysched *sched, quic_keyset *keys)
 Bind the key schedule and key set the completion step operates on.
int quic_srvfin_complete (quic_srvfin_state *s, const u8 *final_transcript, usz final_transcript_len)
 Advance the key schedule to Master over the final transcript (the handshake messages through the client Finished), install the server 1-RTT keys, and confirm.

Detailed Description

RFC 9001 4.1.2: after the client Finished verifies, the server completes the handshake: derive the application (1-RTT) secrets from the transcript including the client Finished, install the 1-RTT key set, and mark the handshake confirmed.

Function Documentation

◆ quic_srvfin_complete()

int quic_srvfin_complete ( quic_srvfin_state * s,
const u8 * final_transcript,
usz final_transcript_len )

Advance the key schedule to Master over the final transcript (the handshake messages through the client Finished), install the server 1-RTT keys, and confirm.

The application secrets are Derive-Secret(Master, ..., transcript), which hashes the raw messages internally, so this takes the raw transcript bytes and length, not a precomputed hash.

Parameters
scompletion state
final_transcriptthe raw handshake messages through the client Finished
final_transcript_lenlength of final_transcript in bytes
Returns
1 on success, 0 on a key schedule order violation (no keys installed, not confirmed).

◆ quic_srvfin_state_init()

void quic_srvfin_state_init ( quic_srvfin_state * s,
quic_keysched * sched,
quic_keyset * keys )

Bind the key schedule and key set the completion step operates on.

Parameters
scompletion state to initialize
schedthe key schedule to advance
keysthe key set to install the 1-RTT keys into