aws / aws/aws-encryption-sdk-java

Support EC Algorithms/Keys

Đang mở
#352 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
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ả

### Problem:

Currently elliptic curve keys do not work due to the "transform" wrapper requiring "RSA/ECB" algorithms which then results in the following stacktrace:

```
Caused by: java.security.InvalidKeyException: No installed provider supports this key: sun.security.ec.ECPublicKeyImpl
at javax.crypto.Cipher.chooseProvider(Cipher.java:896)
at javax.crypto.Cipher.init(Cipher.java:1399)
at javax.crypto.Cipher.init(Cipher.java:1330)
at com.amazonaws.encryptionsdk.internal.RsaJceKeyCipher.buildWrappingCipher(RsaJceKeyCipher.java:95)
at com.amazonaws.encryptionsdk.internal.JceKeyCipher.encryptKey(JceKeyCipher.java:89)
```
EC keys are becoming more and more popular so it would be highly beneficial if we could use EC keys with the encryption SDK.

### Solution:

Allow non-RSA/ECB algorithms for the wrapper in order to allow for EC-based algorithms such as "ECIESwithAES" provided by bouncycastle.

### Out of scope:

Is there anything the solution will intentionally NOT address?

[//]: # (NOTE: If you believe this might be a security issue, please email aws-security@amazon.com instead of creating a GitHub issue. For more details, see the AWS Vulnerability Reporting Guide: https://aws.amazon.com/security/vulnerability-reporting/ )

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách đọc com.amazonaws.encryptionsdk.internal.RsaJceKeyCipher.java và JceKeyCipher.java, sau đó lần theo cách transform wrapper chọn các thuật toán RSA/ECB. Xác định đường dẫn thuật toán dựa trên EC được hỗ trợ như được mô tả trong issue, chẳng hạn như ECIESwithAES từ Bouncy Castle. Hoàn thành khi các khóa EC có thể được sử dụng với Encryption SDK mà không gặp InvalidKeyException đã được báo cáo.

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
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
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
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.