Skip to content

feat(encryption): add whole-object AES-GCM encryption and decryption - #985

Draft
BravoNatalie wants to merge 3 commits into
feat/add-filecoin-envelope-encryptionfrom
feat/encryption-envelope-aes-gcm
Draft

BravoNatalie wants to merge 3 commits into
feat/add-filecoin-envelope-encryptionfrom
feat/encryption-envelope-aes-gcm

Conversation

@BravoNatalie

@BravoNatalie BravoNatalie commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #968

What

Add whole-object AES-256-GCM encryption and decryption with COSE envelope framing. Authentication uses the exact protected-header bytes written to the envelope. Decryption accepts either COSE tag when the caller supplies the CEK directly.

Verification

pnpm test

Return the encoded envelope, its exact protected header bytes, and the selected COSE tag from an internal preparation helper. Keep the public encodeEnvelope interface unchanged
Add scheme 1 encryption with internally generated IVs, COSE Enc_structure
AAD, input validation, and the 64 MiB plaintext limit.

Snapshot caller-owned inputs across async operations and reject recipients
until key wrapping is implemented. Add fixed-vector, mutation-safety,
IV-freshness, and size-boundary tests.
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Sep 26, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/FilOzone/synapse-sdk/@filoz/filecoin-encryption-envelope@985
npm i https://pkg.pr.new/FilOzone/synapse-sdk/@filoz/synapse-core@985
npm i https://pkg.pr.new/FilOzone/synapse-sdk/@filoz/synapse-react@985
npm i https://pkg.pr.new/FilOzone/synapse-sdk/@filoz/synapse-sdk@985

commit: bc8a4b0

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
synapse-dev bc8a4b0 Commit Preview URL

Branch Preview URL
Sep 26 2026, 12:26 AM

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

Status: ⌨️ In Progress

Development

Successfully merging this pull request may close these issues.

1 participant