neqo/neqo-transport
Lars Eggert 673d44df15
feat: Shuffle the client Initial crypto data (#2228)
* feat: Mix up the Initial crypto data a bit

Look for ranges of `N` or more bytes of graphical ASCII data in `data`.
Create at least one split point for each range, multiple ones each `N`
bytes if the range is long enough. Create data chunks based on those
split points. Shuffle the chunks and return them.

CC @martinthomson @dennisjackson

* Fix tests

* Fixes

* Doc fixes

* More tests and corner-case fixes

* Footgun prevention

* WIP; suggestions from @martinthomson

* Address more code review comments

* Refactor loop

* More from @martinthomson

* Again

* Create roughly five chunks per packet

* Latest suggestion from @martinthomson

* Simpler version from @martinthomson

* Fix

* Update neqo-transport/src/crypto.rs

Co-authored-by: Martin Thomson <mt@lowentropy.net>
Signed-off-by: Lars Eggert <lars@eggert.org>

* Use `Decoder`

* Minimize diff

* Fix comment

* Update neqo-transport/src/crypto.rs

Co-authored-by: Martin Thomson <mt@lowentropy.net>
Signed-off-by: Lars Eggert <lars@eggert.org>

* Final suggestions

---------

Signed-off-by: Lars Eggert <lars@eggert.org>
Co-authored-by: Martin Thomson <mt@lowentropy.net>
2024-11-29 07:21:32 +00:00
..
benches bench(transport/recovery): benchmark `SentPackets::take_ranges` (#2253) 2024-11-26 08:48:49 +00:00
src feat: Shuffle the client Initial crypto data (#2228) 2024-11-29 07:21:32 +00:00
tests feat: don't allocate in UDP recv path (#2184) 2024-10-23 10:36:49 +00:00
Cargo.toml bench(transport/recovery): benchmark `SentPackets::take_ranges` (#2253) 2024-11-26 08:48:49 +00:00
build.rs