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

Should use padding for RSA encryption #21

Open
sanity opened this issue Nov 13, 2012 · 3 comments
Open

Should use padding for RSA encryption #21

sanity opened this issue Nov 13, 2012 · 3 comments
Assignees

Comments

@sanity
Copy link
Owner

sanity commented Nov 13, 2012

https://github.com/sanity/tahrir/blob/master/src/main/java/tahrir/io/crypto/TrCrypto.java
RSA/None/NoPadding can only be used securely if no padding is required:
If if the size of the plaintext is a multiple of the block-size... In
encrypt() it is... but not in encryptRaw() ! In any case, you might want
to either have padding OR to introduce a check ;)

OAEP is state of the art; something like
"RSA/None/OAEPWithSHA512AndMGF1Padding" would work nicely.

@ghost ghost assigned sanity Nov 13, 2012
@nomel7
Copy link
Collaborator

nomel7 commented Mar 12, 2013

Would adding padding complicate serializing RSAPublicKey?

@sanity
Copy link
Owner Author

sanity commented Mar 13, 2013

No, I think it will only affect the encrypted data, not the key itself.

On Tue, Mar 12, 2013 at 1:12 PM, Kieran Donegan [email protected]:

Would adding padding complicate serializing RSAPublicKey?


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-14792919
.

Ian Clarke
Blog: http://blog.locut.us/

@sanity
Copy link
Owner Author

sanity commented Jun 3, 2013

Needs some additional research, hold off on this one

@ghost ghost assigned ravisvi and sanity Jun 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants