Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EC Algorithms/Keys #352

Open
MikeDombo opened this issue Sep 27, 2021 · 1 comment
Open

Support EC Algorithms/Keys #352

MikeDombo opened this issue Sep 27, 2021 · 1 comment

Comments

@MikeDombo
Copy link

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?

@lavaleri
Copy link
Contributor

Thank you for the feedback @MikeDombo

You are correct that JceMasterKey only supports RSA as an option for an asymmetric wrapping algorithm. We do not have plans to directly add EC support here.

I'm keeping this issue open as a feature request, and we will update this issue if we have updates on support for EC as an option for wrapping algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants