nquic_protocol_key_update (nquic v1.0.0)
View SourceQUIC key update (RFC 9001 Section 6).
Pure functions over #conn_state{} implementing 1-RTT key rotation:
deriving the next application traffic secrets, flipping the key phase,
and tracking the previous read keys so packets sent with the old phase
can still be decrypted during the transition. External side effects
are limited to nquic_keys.
Summary
Functions
-spec initiate_key_update(nquic_protocol:state()) -> {ok, nquic_protocol:state()} | {error, key_update_pending}.
-spec maybe_handle_key_update(nquic_packet:header(), nquic_protocol:state()) -> nquic_protocol:state().
-spec perform_key_update(nquic_protocol:state()) -> nquic_protocol:state().