mozilla / rust-ece

Encrypted Content-Encoding for HTTP (RFC 8188) Rust implementation
Mozilla Public License 2.0
25 stars 11 forks source link

Implement record chunking for "aes128gcm" scheme. #60

Closed rfk closed 3 years ago

rfk commented 3 years ago

This restores previous functionality where "aes128gcm" could chunk large payloads into multiple records. It is using a different algorithm than the previous implementation, but one that I think is easier to understand (or at least, better documented 😅).

I want to add more tests, but pushing for visibility.

Connects to #55.

rfk commented 3 years ago

Alrighty, I've added some tests here and it's behaving as I expect, so I think this is ready for review @jrconlin.

rfk commented 3 years ago

@mhammond if you're happy to take a look here, I'd appreciate a fresh set of eyes on my hypothesis that this chunking algorithm is "easier to understand"...

rfk commented 3 years ago

I'm going to go ahead and merge this on the strength of Marks' review, the fact that it successfully round-trips through our existing multi-record-decoding setup, and the fact that I was able to manually send a 5000+ byte send-tab payload from the Rust code to Firefox and confirmed that it was chunked into multiple records and was received correctly.