quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.85k stars 394 forks source link

0-RTT key lifecycle #1491

Closed yushizhao closed 1 year ago

yushizhao commented 1 year ago

Hi team, I see 0-RTT requires a cryptographic session ticket cached. I wonder how long would a cached 0-RTT key keeps available? And who is responsible for keeping it?

Ralith commented 1 year ago

That's really a TLS question, not specific to QUIC. In general, clients are responsible for storing tickets (IIRC rustls caches in-memory by default, but you might want to customize that to persist across restarts), and the server is responsible for judging when a key is expired.

yushizhao commented 1 year ago

Okay, so we should look for rustls API to understand and customize the behavior, right? Would you mind give a little guideline where we can tune rustls in quinn clients?

Ralith commented 1 year ago

Yep. See quinn/examples/client.rs.