Skip to content

feat(quic): implement 0-RTT session ticket storage and restoration#419

Merged
kcenon merged 2 commits into
mainfrom
feature/issue-402-0rtt-session-ticket
Jan 11, 2026
Merged

feat(quic): implement 0-RTT session ticket storage and restoration#419
kcenon merged 2 commits into
mainfrom
feature/issue-402-0rtt-session-ticket

Conversation

@kcenon

@kcenon kcenon commented Jan 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implement session ticket storage for QUIC 0-RTT connection resumption (RFC 9001 Section 4.6)
  • Add session_ticket_store class for managing session tickets per server endpoint
  • Add replay_filter class for anti-replay protection on 0-RTT early data
  • Add 0-RTT key derivation methods to quic_crypto
  • Add early data callbacks to messaging_quic_client

Changes

New Files

  • include/kcenon/network/protocols/quic/session_ticket_store.h - Session ticket storage and replay filter
  • src/protocols/quic/session_ticket_store.cpp - Implementation
  • tests/test_quic_session_ticket.cpp - Unit tests (20+ tests)

Modified Files

  • include/kcenon/network/protocols/quic/crypto.h - Add 0-RTT methods
  • src/protocols/quic/crypto.cpp - Implement 0-RTT key derivation
  • include/kcenon/network/core/messaging_quic_client.h - Add early data callbacks
  • src/core/messaging_quic_client.cpp - Implement callbacks
  • CMakeLists.txt - Add new source file
  • tests/CMakeLists.txt - Add new test
  • CHANGELOG.md, CHANGELOG_KO.md - Document changes

Features

session_ticket_store

  • Thread-safe storage of session tickets by server:port
  • Automatic expiry checking
  • Cleanup of expired tickets

session_ticket_info

  • Ticket data and metadata
  • Expiry time tracking
  • Obfuscated age calculation (RFC 8446)

replay_filter

  • Time-based sliding window for nonce tracking
  • Configurable window size and max entries
  • Thread-safe check-and-record operation

quic_crypto 0-RTT Methods

  • set_session_ticket_callback() - Receive NewSessionTicket messages
  • set_session_ticket() - Set ticket for resumption
  • enable_early_data() - Enable 0-RTT data
  • derive_zero_rtt_keys() - Derive 0-RTT encryption keys
  • has_zero_rtt_keys() / is_early_data_accepted() - Status queries

messaging_quic_client Callbacks

  • set_session_ticket_callback() - Store tickets for future use
  • set_early_data_callback() - Produce early data
  • set_early_data_accepted_callback() - Know if server accepted
  • is_early_data_accepted() - Query acceptance status
  • max_early_data_size config option

Test plan

  • Run network_quic_session_ticket_test - Unit tests for session ticket storage
  • Run network_quic_crypto_test - Existing crypto tests still pass
  • Verify thread safety with concurrent tests
  • Build passes on all platforms

Closes #402

Add session ticket management for QUIC 0-RTT connection resumption:

- Add session_ticket_store class for storing/retrieving session tickets
- Add session_ticket_info structure with ticket metadata and validation
- Add replay_filter for anti-replay protection on 0-RTT data
- Add 0-RTT key derivation methods to quic_crypto
- Add session ticket callback to receive NewSessionTicket messages
- Add early data callbacks to messaging_quic_client
- Add max_early_data_size configuration option
- Add comprehensive unit tests for session ticket management

Implements RFC 9001 Section 4.6 session resumption support.

Closes #402
Add changelog entries for QUIC 0-RTT session ticket storage
implementation in both English and Korean versions.
@github-actions

Copy link
Copy Markdown
Contributor

Performance Comparison

Base Branch Results

No base results

PR Branch Results

No PR results

@codecov

codecov Bot commented Jan 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.19%. Comparing base (a4d8129) to head (449adce).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #419      +/-   ##
==========================================
+ Coverage   32.94%   33.19%   +0.24%     
==========================================
  Files          39       39              
  Lines        2841     2841              
==========================================
+ Hits          936      943       +7     
+ Misses       1905     1898       -7     
Flag Coverage Δ
unittests 33.19% <ø> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kcenon kcenon merged commit 6f40c91 into main Jan 11, 2026
46 checks passed
@kcenon kcenon deleted the feature/issue-402-0rtt-session-ticket branch January 11, 2026 18:18
kcenon added a commit that referenced this pull request Apr 13, 2026
)

* feat(quic): implement 0-RTT session ticket storage and restoration

Add session ticket management for QUIC 0-RTT connection resumption:

- Add session_ticket_store class for storing/retrieving session tickets
- Add session_ticket_info structure with ticket metadata and validation
- Add replay_filter for anti-replay protection on 0-RTT data
- Add 0-RTT key derivation methods to quic_crypto
- Add session ticket callback to receive NewSessionTicket messages
- Add early data callbacks to messaging_quic_client
- Add max_early_data_size configuration option
- Add comprehensive unit tests for session ticket management

Implements RFC 9001 Section 4.6 session resumption support.

Closes #402

* docs: update changelogs for 0-RTT session ticket feature

Add changelog entries for QUIC 0-RTT session ticket storage
implementation in both English and Korean versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QUIC] Implement 0-RTT session ticket storage and restoration

1 participant