-1
$\begingroup$

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

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

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.

$\endgroup$

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