If the message that was signed with a digital signature is not known, can it still be recovered if you have the private key?


In generally it will not be possible: the signature generation generally includes hashing the message, and secure hashes are one-way functions.

Often the hash can be retrieved during verification with the public key. This is for instance the case for RSA. If you have the hash you can try all possible messages until you find one that calculates to that same hash. This will of course only work if the message space is restricted; the higher the number of valid messages, the lower the chance to find the right one. With a secure hash with any kind of secure output you can however be certain that if a matching message is found that it is the right one.

If the signature verification requires a hash as input, e.g. for ECDSA you may be required to perform the whole verification, which will take longer, so searching may take more time.

There are signature schemes that provide (partial) message recovery (see ISO/IEC 9796-2). In that case the public key verification operation will return (part of) the message. This is useful for data constrained devices such as smart cards.

For verification the private key is not needed, so the answer is no. Having the private key doesn't bring you any benefit over using the public key.

| improve this answer | |
  • $\begingroup$ Does this answer your question? Please indicate what is missing if it does not, or accept the answer if it does! $\endgroup$ – Maarten Bodewes Mar 12 '18 at 15:26

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.