aws / aws/aws-encryption-sdk-java
Support EC Algorithms/Keys
- Vorherrschende Sprache
- Java
- Sterne
- 240
- Forks
- 125
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### 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/ )
Beitragsleitfaden
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- cryptography, security
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100