feat(encryption): add envelope range decryption - #989
Open
BravoNatalie wants to merge 8 commits into
Open
BravoNatalie wants to merge 8 commits into
BravoNatalie wants to merge 8 commits into
Conversation
BravoNatalie
requested review from
JAG-UK
and removed request for
hugomrdias and
rvagg
September 28, 2026 00:15
commit: |
BravoNatalie
added this pull request to stack #990
September 28, 2026 00:18
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
synapse-dev | 30608dd | Commit Preview URL Branch Preview URL |
Sep 28 2026, 12:23 AM |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #968
Description
Adds random-access reads for chunked objects: inspect an envelope without a key, then decrypt one plaintext byte range while fetching only the chunks it covers.
Changes
parse(source): unauthenticated inspection of scheme, headers and recipients. For chunked objects it also returnsparamsthat range reads can reuse to skip re-reading the envelope.decryptRange(source, cek, range, options?)anddecryptRangeWith(source, unwrapper, range, options?): return the range length, total plaintext length and ciphertext span before any ciphertext is fetched, then stream the range from one contiguous request. Each chunk is authenticated before its plaintext is released.RandomAccessSourcecontract (sizeplusopenRange), with a built-inUint8Arrayadapter.InvalidRangeErrorandInvalidSourceLengthError.Not included
params(they're in-memory only).openRange.