-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/rsa: extend EncryptOAEP to accept a different maskgen hashing as parameter #34233
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
Comments
Awesome:
--https://developer.android.com/guide/topics/security/cryptography#oaep-mgf1-digest [emphasis added] It seems like the easy solution here is to add a /cc @agl @FiloSottile |
RFC 2437 theoretically allows maskGenFunc to not even be MGF1-based. So an alternative option here would be to add a This would probably merit exposing |
Alright! I'd like to suggest this hypotesis as a valid implementation, but I've read that OAEPOptions was just related to decrypt function. So I changed my mind and I decided to add an optional parameter at the end of the function EncryptOEAP to be not confused. As I'm new here, my question is that should I submit a PR with the resolution, or assume that you gonna fix that. Thanks for the answer. |
Yes, you're right. Sorry, I didn't look closely enough at the API to see how I think For backwards compatibility though, we can't add parameters to existing functions. |
Duplicate of #19974 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Tried to use the rsa.EncryptOAEP function to generate a ciphertext to be opened by an Android Keystore.
What did you expect to see?
https://play.golang.org/p/Ms7ocbI-IE1
What did you see instead?
https://play.golang.org/p/BSnw2Q7ngNO
The text was updated successfully, but these errors were encountered: