Parent
Architecture review (2026-06-21), "Latency tricks worth lifting wholesale". Independent of the deepening series. Smallest slice in this batch — could land in under an hour.
What to build
Both libsodium ChaCha20-Poly1305 and ring's AES-GCM support overlapping input/output buffers (m == c). Saves one stack-allocated buffer per encrypted packet. The architecture review claims AnyPlug's crypto "already uses ring"; this slice verifies whether the in-place pattern is actually in use, and adopts it if not.
Audit shared/usbip-core/src/crypto.rs and the call sites in usbip-server/src/crypto_stream.rs (and the matching client side). For each decrypt call, check whether the plaintext buffer is freshly allocated, or whether it's aliased to the ciphertext buffer. If aliased, document with a comment; if not, refactor to alias.
Acceptance criteria
Blocked by
None — can start immediately.
Parent
Architecture review (2026-06-21), "Latency tricks worth lifting wholesale". Independent of the deepening series. Smallest slice in this batch — could land in under an hour.
What to build
Both libsodium ChaCha20-Poly1305 and ring's AES-GCM support overlapping input/output buffers (
m == c). Saves one stack-allocated buffer per encrypted packet. The architecture review claims AnyPlug's crypto "already uses ring"; this slice verifies whether the in-place pattern is actually in use, and adopts it if not.Audit
shared/usbip-core/src/crypto.rsand the call sites inusbip-server/src/crypto_stream.rs(and the matching client side). For each decrypt call, check whether the plaintext buffer is freshly allocated, or whether it's aliased to the ciphertext buffer. If aliased, document with a comment; if not, refactor to alias.Acceptance criteria
usbip-core/src/crypto.rslists each decrypt call site with a one-line verdict: "in-place" or "allocates"cargo test --workspace --releasepasses (especiallycargo test -p usbip-core --releasefor the crypto round-trip tests)cargo clippy --workspace -- -D warningscleanSealedSession::open/sealBlocked by
None — can start immediately.