aws / aws/aws-encryption-sdk-java

Question : how to random access or skip during decryption

已关闭
#2,121 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
240
派生
125
PR 合并指标
30 天内没有已合并 PR

描述

### Problem:

I have a need to handle large files and service a random address range for decryption.
Looking throgh the exampes I dont see an effecient way to do this.
It seems that the underlying encryption data is framed, but the CryptoInputStream doesn't skip in an input stream, and there isnt a support for a Readable Channel that I am aware of

### Solution:
With the existing API - I could use skip in the InputStream, but this will (as I see it) decrypt and throw away the skipped bytes, with extra I/O and CPU load
With an enhanced implementation we could skip on the input stream to the start of a frame and then decrypt that frame (skipping internally to the offset needed by decodng and thowin a few bytes if needed)

### Out of scope:

贡献指南

打开贡献指南

调研方向

从现有的 CryptoInputStream API 及其分帧加密输入行为入手,然后将 InputStream.skip 与所请求的 Readable Channel 支持进行比较。完成的标准是:调用方可以通过 seek 到相关帧来处理任意地址范围,并避免对被丢弃字节进行解密和 I/O。

由索引模型根据 Issue 内容生成。

评估

技术栈
aws, java
领域
security
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。