]> git.kaiwu.me - haproxy.git/commit
OPTIM: quic: use native HKDF APIs where available
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 14 Oct 2026 15:22:11 +0000 (17:22 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 16 Oct 2026 08:41:24 +0000 (10:41 +0200)
commit20686bf5fde227d857dc757ffd791353bb99256e
tree5be76e174929e89cf4b4ca2d6ad377f07cc22233
parent9a5915dfe545dfa57a0987b1756b1d0635870ac1
OPTIM: quic: use native HKDF APIs where available

QUIC key and token derivation currently uses EVP_PKEY for all HKDF
operations, creating and configuring a context for each derivation.

Use HKDF_extract(), HKDF_expand() and HKDF() directly with AWS-LC and
BoringSSL. With OpenSSL 3, use EVP_KDF directly to bypass the EVP_PKEY
compatibility layer and pass the parameters in a single call. Keep the
EVP_PKEY approach for the other SSL libraries.

Centralize the three HKDF modes in a common helper and make the extract
and expand wrappers private to quic_tls.c.

Local HTTP/3 tests with an unchanged HALoad client, one full handshake
per request and empty responses showed these median request rates
and paired gains:

  SSL library          HATerm HEAD    HATerm patched    Paired gain
  OpenSSL 3.5.4            486              540             +11%
  AWS-LC 5.9.0             903              950              +4%
without session resumption.

Validated with RFC 5869 and RFC 9001 vectors and full QUIC handshakes.
include/haproxy/quic_tls.h
src/quic_tls.c