Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(s2n-quic-dc): expanded replay protection #2462

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Mark-Simulacrum
Copy link
Collaborator

Release Summary:

Improves replay protection tracking to guarantee 2^16 replay window tracking in the absence of memory pressure, unlike the previous implementation which was dependent on hash collisions not happening (and so had no strong guarantee outside of ~128 entries).

Description of changes:

This is a pretty large set of changes, and may still evolve in response to review -- the overall idea is to allocate from a shared memory region (essentially a mixed-type slab) for either "sorted lists" (1-3700 entries, roughly) or bitsets (3700-65k entries) with a maximum per-path-secret usage of around 8kb. The resulting structure provides the release summary guarantee that if we don't have sufficient reordering across all peers that we use up our general allocation, we will be be tracking reliably up to 2^16 entries out. Our modeling suggests that at current reordering rates, we shouldn't ever use up close to the full map, but we'll prove that out once this gets deployed.

Opening for preliminary review, especially looking for high-level feedback: can we simplify something at low cost, ideas for different tradeoffs, etc.

Call-outs:

TODO

Testing:

TODO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

A key id flows through the following structures:

* max seen key ID
* 32-bit bitset
* variable sized set (bitset or sorted list, tracking back 65k)
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.

1 participant