aws / aws/aws-encryption-sdk-java
CryptoOutputStream outputs invalid message when used to encrypt empty plaintext
- 主要语言
- Java
- 星标
- 240
- 派生
- 125
- PR 合并指标
- 30 天内没有已合并 PR
描述
In order to perform the "encrypt a zero length plaintext" using a CryptoOutputStream, the correct setup would be to create the CryptoOutputStream, don't write any bytes to it, then immediately call `close()`.
This results in the CryptoOutputStream only writing bytes for an empty final frame (and possibly a footer). It does not write any header bytes, resulting in an invalid message that cannot be parsed by any AWS Encryption SDK implementation.
This should be fixed such that this use case will correctly write header bytes before the message body and footer, resulting in a message that can be successfully decrypted into the plaintext "".
贡献指南
调研方向
从 CryptoOutputStream 开始,重现调用 close() 但不写入明文的情况。跟踪空的最终帧是如何发出的,并验证 AWS Encryption SDK 的实现可以解析并解密生成的消息,得到空明文。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- cryptography, security
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100