aws / aws/aws-encryption-sdk-java
CryptoOutputStream outputs invalid message when used to encrypt empty plaintext
- Ngôn ngữ chính
- Java
- Star
- 240
- Fork
- 125
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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 "".
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với CryptoOutputStream và tái hiện trường hợp gọi close() mà không ghi bản rõ. Theo dõi cách frame cuối rỗng được phát ra và xác minh rằng thông báo kết quả có thể được một bản triển khai của AWS Encryption SDK phân tích và giải mã thành bản rõ rỗng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- cryptography, security
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100