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 more hash types in RSA PKCS1v15 and PSS #235

Merged
merged 12 commits into from
Dec 18, 2024
Merged

Support more hash types in RSA PKCS1v15 and PSS #235

merged 12 commits into from
Dec 18, 2024

Conversation

qmuntal
Copy link
Collaborator

@qmuntal qmuntal commented Dec 17, 2024

This PR expands the supported hash types, as reported by openssl.SupportsHash, to increase the compatibility of the RSA PCKS1v15 and PSS sign and verify functions with the standard library. It is now possible to use those algorithms with crypto.RIPEMD160, crypto.SHA512_224 and crypto.SHA512_256, if the OpenSSL provider (or legacy engine) supports it.

While here, clean up cryptoHashToMD and SupportsHash. The former doesn't need to check if the given hash is supported or not.

@qmuntal qmuntal marked this pull request as ready for review December 17, 2024 14:11
rsa_test.go Outdated Show resolved Hide resolved
Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
@qmuntal qmuntal merged commit 7b07994 into v2 Dec 18, 2024
54 checks passed
@qmuntal qmuntal deleted the pkcs1hash branch December 18, 2024 18:01
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

Successfully merging this pull request may close these issues.

3 participants