-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add OAEP encoding that uses SHA-256 #98
Conversation
Hi, Thanks very much for this for testing take look at where sha256 is used as both mask and hash function. [https://github.com/bcgit/bc-java/blob/master/core/src/test/java/org/bouncycastle/crypto/test/OAEPTest.java#L792] and [https://github.com/bcgit/bc-java/blob/master/core/src/test/java/org/bouncycastle/crypto/test/OAEPTest.java#L812] MW |
It probably just misses doc comments... |
It would be great if this could be merged😇🙏 |
Would really like this merged! 🙏 |
It works great!! Would be awesome if it was merged! :) |
By using this P.R, does it make usable the java Cipher class's "RSA/ECB/OAEPWithSHA-256AndMGF1Padding" on the Flutter? (I'm the newbie in the Crypto & Security fields =)) I'd like to know if this PR could handle the above algorithm case. |
Is there any update on when this PR will be merged? |
I am adding more tests to it and endeavouring to exercise OAEP more generally. MW |
Thanks, I added further testing to this mainly for SHA256. It will be synced shortly. MW |
This is mainly a clone of the
OAEPEncoding
class, but using a SHA-256 hash.This has been verified as compatible with:
cryptography
package: https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/#encryptionStill to do: incorporate in the package RSA tests and name-based encoding resolution. I honestly don't know the best way to go about this. I'm really not familiar with the package standards in that regard.
Edit
Now, there's a single class
OAEPEncoding
that exposes new factories to use different digests. OnlySHA256Digest
has been tested and verified.This PR does not break existing code in any way.