aws / aws/aws-encryption-sdk-java

Support EC Algorithms/Keys

オープン
#352 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
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/ )

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reading com.amazonaws.encryptionsdk.internal.RsaJceKeyCipher.java and JceKeyCipher.java, then trace how the transform wrapper selects RSA/ECB algorithms. Determine the supported EC-based algorithm path described in the issue, such as ECIESwithAES from Bouncy Castle. Done means EC keys can be used with the encryption SDK without the reported InvalidKeyException.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
cryptography, security
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。