Search code examples
hashcryptographycertificatersadigital-signature

How Hash Algorithm is determined in Digital Signature?


I was studying about the Digital Signature working mechanism and it got me thinking.

Let's assume Alice want to send a digitally signed message to Bob.

The first step in the process is Alice generates a message digest of the original plaintext message using a Hash function.

  1. So, which Hashing Algorithm does Alice uses?
  2. Does she uses SHA3-512,SHA3-384, MD5 etc.How was the Hashing algorithm determined in the first place?
  3. Can someone provide the right document for it? or an Excerpt from any document.

Solution

    1. So, which Hashing Algorithm does Alice uses?

    Any strong hashing algorithm, i.e. one which boasts:

    • Pre-image resistance
    • 2nd pre-image resistance
    • Collision resistance
    • is deterministic
    • is fast
    • is uniform in output
    1. Does she uses SHA3-512,SHA3-384, MD5 etc.How was the Hashing algorithm determined in the first place?

    SHA1, MD5 are weak, as they don't satisfy the properties mentioned in point 1. Any other algorithm is fine. Some particular hash functions have design that may be beneficial, sponge functions etc.

    1. Can someone provide the right document for it? or an Excerpt from any document.

    The choice of which digest to use varies from protocol to protocol, I don't think many of these protocols think further than selecting a digest that's known to be strong.