Are digital signatures sent with the message that are contained in them or is just the digital signature sent? Since when the public verification transformation is applied by the recipient to the digital signature you receive both the message and a boolean indicating if origin of authentication, non-repudiation and integrity are all intact. It seems redundant that the message is sent with the digital signature (since as mentioned after applying the transformation you get the message back anyway). However, it also doesn't seem practical to not send it - so i'm not sure.

  • 1
    You often don't sign the message but a hash of the message. In these cases the signature doesn't contain the full message.
    – Arminius
    Commented May 16, 2017 at 19:37
  • 1
    So if a hash of the message is sent then it is sent with the digital signature. By often are we talking about nearly always (in practice)?
    – Mark
    Commented May 16, 2017 at 19:41
  • At least regarding RSA you will even run into security problems when signing without hashing first.
    – Arminius
    Commented May 16, 2017 at 19:57

2 Answers 2


If by signing you mean encrypting the message with some private signing key, then it would be redundant to send the plaintext of the message along with the resulting ciphertext. In this case the receiving party would simply decrypt the message using the sending party's public key in order to verify authenticity. However, it is usually the hash of the message that is signed. So you would send the message along with the signed message hash.

  • Yes, by signing i meant encrypting the message with a private signing transformation (key).
    – Mark
    Commented May 16, 2017 at 19:53

All the systems I have used do the following

  • Compute a hash of the message using a hashing algorithm.
  • Create a digital signature of the hash value using public-key cryptography.
    • essentially this the encrypted value of the hash
  • Append the signature to the message (or vice versa) in a container.

This provides proof of sender identity and message integrity without providing confidentiality.

The recipient will then

  • use the sender's public key to decrypt the signature and obtain the hash value,
  • independently compute the hash-value from the message text
  • compare the two hash values to verify authorship and message-integrity

An example of this is XML-DSIG

A signed XML message might have this sort of structure.

    <Text>Meet at Foo HQ at 12:30!</Text>

The content of the message is not reproducible from the signature. The two things are separate.

Similar ideas apply to other uses of digital signatures.

One reason is that public key cryptography is slow, so you apply it to the smallest amount of data needed for your purpose.

If you need confidentiality you encrypt the message body using faster symmetric (shared-key) cryptography. The sender can then include the symmetric key with the body hash and other matter that is encrypted using public-key cryptography. The hash is encrypted with the sender's private key but the shared key would be encrypted using the recipient's public key. The shared key and the message hash will generally be much shorter than average message body content, and so this approach is quicker and makes better use of computing resources.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .