|
wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
|
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 | srvfin_state |
| Server handshake-completion state. More... | |
Functions | |
| void | srvfin_state_init (srvfin_state *s, keysched *sched, keyset *keys) |
| Bind the key schedule and key set the completion step operates on. | |
| int | srvfin_complete (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. | |
| int | srvfin_early_send_keys (srvfin_state *s, const u8 *transcript, usz transcript_len) |
| Derive and install the server's 1-RTT send keys early, before the client Finished arrives (0.5-RTT, RFC 9001 4.9 / RFC 8446 7.1): the application traffic secrets depend only on the transcript through the SERVER Finished, which is complete the moment the flight is built. | |
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.
| int srvfin_complete | ( | 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.
| s | completion state |
| final_transcript | the raw handshake messages through the client Finished |
| final_transcript_len | length of final_transcript in bytes |
| int srvfin_early_send_keys | ( | srvfin_state * | s, |
| const u8 * | transcript, | ||
| usz | transcript_len ) |
Derive and install the server's 1-RTT send keys early, before the client Finished arrives (0.5-RTT, RFC 9001 4.9 / RFC 8446 7.1): the application traffic secrets depend only on the transcript through the SERVER Finished, which is complete the moment the flight is built.
Does NOT confirm the handshake; a later srvfin_complete over the same transcript derives identical secrets, so calling both is safe in either order.
| s | completion state |
| transcript | the raw handshake messages through the server Finished |
| transcript_len | length of transcript in bytes |
| void srvfin_state_init | ( | srvfin_state * | s, |
| keysched * | sched, | ||
| keyset * | keys ) |
Bind the key schedule and key set the completion step operates on.
| s | completion state to initialize |
| sched | the key schedule to advance |
| keys | the key set to install the 1-RTT keys into |