Consider streaming decryption/write path to reduce peak memory usage for large files
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- javascript
- Lĩnh vực
- cryptography, performance
Hướng nghiên cứu
Start by locating the download verification/decryption flow that accumulates chunks[], calls concatBytes(...chunks), and allocates Uint8Array(pLen), then read the streaming primitives sbInit and sbDecryptChunk. The issue does not define an implementation scope; clarify the architecture and acceptance criteria for incremental writes, final authentication failure cleanup, padding/header parsing, and resumable downloads before coding.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I noticed the current download verification/decryption flow buffers the full encrypted file into memory before decrypting.
Current flow appears to:
accumulate encrypted chunks in chunks[]
concatenate them via concatBytes(...chunks)
allocate another full plaintext buffer with new Uint8Array(pLen)
This can significantly increase peak memory usage for large files, especially on mobile browsers.
The crypto layer itself already seems stream-capable (sbInit, sbDecryptChunk, incremental Poly1305 state), so I was wondering whether a more streaming-oriented architecture could be considered in the future.
Possible direction:
download chunk
→ decrypt incrementally
→ write plaintext directly to OPFS/temp storage
→ finalize/verify auth tag at end
This could reduce peak RAM usage from approximately full-file-size multiples down to near chunk-size memory usage.
I understand there are important tradeoffs around:
final authentication validation
temporary storage cleanup on auth failure
padding/header parsing
resumable download behavior
So I wanted to ask whether this direction would be desirable before experimenting with an implementation.
- Ngôn ngữ chính
- Haskell
- Star
- 865
- Fork
- 125
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 64
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của simplex-chat/simplexmq
-
xftp CLI: Generated web link is missing the /file pathCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
simplex-chat/simplexmq#1853 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
simplex-chat/simplexmq#1781 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
simplex-chat/simplexmq#2074 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
simplex-chat/simplexmq#2017 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
resolver: resolve .simplex names, on smp7 and then on the preset routersCó thể đã có người làm @shumvgolove đã nhận 18 ngày trước. Đang mở
simplex-chat/simplexmq#2011 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của simplex-chat/simplexmq
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
alunduil/siren-json.hs#322 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dead link in readmeĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
commercialhaskell/rio#287 ·
-
wide-word-0.2Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
commercialhaskell/stackage#8181 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug desktop
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
simplex-chat/simplex-chat#8291 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: C# programs with top-level statements fail to compileCó thể đã có người làm @AsyncNigam đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
compiler-explorer/compiler-explorer#9625 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày