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?
to your account
$ go version
go version go1.15.5 linux/amd64
rsa.VerifyPKCS1v15(myPublicKey, crypto.SHA3_224, hashed, signature)
A properly verified hash. pkcs1v15HashInfo() needs to calculate the ASN1 DER prefix for algorithms that aren't in the lookup table.
crypto/rsa: unsupported hash function
The current code has a table of precomputed ASN1 DER prefixes for 8 algorithms. All other algorithms get crypto/rsa: unsupported hash function, even though they are valid.
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
It's a bit unclear to me why anyone would want to use legacy PKCS#1 v1.5 with SHA-3, but if there is a need I'd accept a PR to add the relevant ASN.1 prefixes.
I too wish the originator of the signatures I'm dealing with had used PSS. I'll try to find some time to submit a PR so I can ditch the current workaround I put in place.
Trying to reimplement a program, for some reason they use an SHA-3 hash in this way and it's broken for me.
@shaunco What's your workaround?
No branches or pull requests