1

why is a hash needed for digital signatures? isn't it redundant since the point of hashing is to ensure contents are not tampered with , which the digital signature can do as well (on top of ensuring txn comes from the person)

2 Answers 2

3

I addition to Claris' answer, if your question is about ECDSA, the hashing step is actually an essential part of the signature scheme and not just a step we choose to do before invoking it. Without it, the signature would not be secure. This is because given a public key, it is possible to compute (signature, message hash) pairs such that the signature is valid for the given public key and computed message hash. However, the message hash won't be the hash of a known message then, and thus making ECDSA verifiers redo the hashing is sufficient to prevent this attack.

1

Hashing ensures we get a constant length input for the signature operation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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