I want to know if they do, and if they don't which ones don't require public keys.


closed as unclear what you're asking by Squeamish Ossifrage, forest, kelalaka, fgrieu, Maeher Feb 21 at 8:01

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ SHA1 doesn't have a concept of keys at all. It's just a hash function. $\endgroup$ – Natanael Feb 20 at 1:55
  • $\begingroup$ SHA does not stand for Signature&HAndshake! $\endgroup$ – DannyNiu Feb 20 at 2:25

I guess this confusion is due to OpenSSL command line (openssl dgst if I'm not mistaken) or functions such as Java's "SHAwithRSA". However, signature verification commonly uses a hash over the message to perform the operation as well as a public key. It is not the hash itself that accepts a public key. In that sense, such interfaces are badly named.

A hash has only one input: a variable sized message encoded as bits (generally only full bytes are supported), and a single statically sized output. There is no way that they accept a public key, except if it is input as encoded value, but then it would just be treated as part of the input message.

Read the PKCS #1: RSA Cryptography Specifications Version 2.2 to understand how the hash is used.


Not the answer you're looking for? Browse other questions tagged or ask your own question.