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

OAEP encryption using SHA1? #13

Closed
core433 opened this issue Oct 6, 2017 · 1 comment
Closed

OAEP encryption using SHA1? #13

core433 opened this issue Oct 6, 2017 · 1 comment
Labels

Comments

@core433
Copy link

core433 commented Oct 6, 2017

Public Encrypt is using sha1 for the hash function, is that secure? It sounds like sha1 is being deprecated because it's been theoretically crackable since 2005. Is this the same hash function that node crypto is using / are they not on sha2 / sha256?

@calvinmetcalf
Copy link
Contributor

This is what node uses and a very quick read through the spec looks like it's called for explicitly.

More generally hashes can fail in multiple ways, the way SHA1 has been broken is that researchers have been able to generate 2 different things that hash the same, OAEP unlike say, signatures, doesn't rely on this aspect of the hash function, but instead relies on the fact that given a hash, you shouldn't be able to figure out the message that hashes to it and that is less broken.

That being said from my understanding, RSA is not where the energy is going and and you should probably be using elliptical curve based stuff if you need to send secret data.

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

No branches or pull requests

3 participants