aws / aws/aws-encryption-sdk-java
Support EC Algorithms/Keys
- 主要语言
- Java
- 星标
- 240
- 派生
- 125
- PR 合并指标
- 30 天内没有已合并 PR
描述
### 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/ )
贡献指南
调研方向
首先阅读 com.amazonaws.encryptionsdk.internal.RsaJceKeyCipher.java 和 JceKeyCipher.java,然后跟踪 transform wrapper 如何选择 RSA/ECB 算法。确定 issue 中描述的受支持的基于 EC 的算法路径,例如 Bouncy Castle 的 ECIESwithAES。当 EC 密钥可以与 Encryption SDK 一起使用且不会出现报告中的 InvalidKeyException 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- cryptography, security
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100