nquic_handshake (nquic v1.0.0)
View SourceQUIC handshake management.
This module handles TLS 1.3 handshake integration, key derivation, and handshake packet construction for QUIC connections.
Summary
Functions
Build frames for a Handshake packet with CRYPTO data.
Build frames for an Initial packet with CRYPTO data.
Derive initial encryption keys from DCID per RFC 9001.
Derive initial encryption keys from DCID for a specific QUIC version.
Convert TLS key material to packet protection format.
Convert TLS key material to packet protection format with cached HP context.
Format and install application keys from TLS-derived secrets.
Format and install handshake keys from TLS-derived secrets.
Functions
-spec build_handshake_frames(binary()) -> [nquic_frame:t()].
Build frames for a Handshake packet with CRYPTO data.
-spec build_initial_frames(binary()) -> [nquic_frame:t()].
Build frames for an Initial packet with CRYPTO data.
-spec derive_initial_keys(nquic:connection_id()) -> #{client := #{key := binary(), iv := binary(), hp := binary()}, server := #{key := binary(), iv := binary(), hp := binary()}}.
Derive initial encryption keys from DCID per RFC 9001.
-spec derive_initial_keys(nquic:connection_id(), non_neg_integer()) -> #{client := #{key := binary(), iv := binary(), hp := binary()}, server := #{key := binary(), iv := binary(), hp := binary()}}.
Derive initial encryption keys from DCID for a specific QUIC version.
-spec format_keys(map()) -> #{client := #{key := binary(), iv := binary(), hp := binary()}, server := #{key := binary(), iv := binary(), hp := binary()}}.
Convert TLS key material to packet protection format.
-spec format_keys(map(), aes_128_gcm | aes_256_gcm | chacha20_poly1305) -> #{client := #{key := binary(), iv := binary(), hp := binary()}, server := #{key := binary(), iv := binary(), hp := binary()}}.
Convert TLS key material to packet protection format with cached HP context.
-spec install_app_keys(map(), map()) -> #{application := #{client := #{key := binary(), iv := binary(), hp := binary()}, server := #{key := binary(), iv := binary(), hp := binary()}}}.
Format and install application keys from TLS-derived secrets.
-spec install_handshake_keys(map(), map()) -> #{handshake := #{client := #{key := binary(), iv := binary(), hp := binary()}, server := #{key := binary(), iv := binary(), hp := binary()}}}.
Format and install handshake keys from TLS-derived secrets.