Skip to content

feat!: reserve counters and decrypt data messages in batches - #129

Draft
thomaseizinger wants to merge 1 commit into
mainfrom
batched-crypto
Draft

thomaseizinger wants to merge 1 commit into
mainfrom
batched-crypto

Conversation

@thomaseizinger

@thomaseizinger thomaseizinger commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

begin_encapsulate now returns an EncapsulateBatch that borrows the tunnel until finish(len) reserves len consecutive counters, so a caller with several packets for one tunnel copies the session key and builds the AEAD key once per batch instead of once per message. On the receive side, begin_decapsulate returns a DecapsulateBatch that collects all data messages of one session, such as the segments of a GRO datagram, into one decryption job with a single key copy.

@thomaseizinger
thomaseizinger changed the base branch from main to session-id October 23, 2026 04:25
Base automatically changed from session-id to main October 27, 2026 02:15
`begin_encapsulate` now returns an `EncapsulateBatch` that borrows the
tunnel until `finish(len)` reserves `len` consecutive counters, and
`begin_decapsulate` returns a `DecapsulateBatch` that collects all data
messages of one session, such as the segments of a GRO datagram, before
`finish` hands them to a decryption worker. Either side copies the
session key and builds the AEAD key once per batch instead of once per
message.

This branch has not been deployed

No deployments
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.

2 participants