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.
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.
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.
<Envelope> <Header> <Signature> ... </Signature> </Header> <Body> <From>Sue</From> <Text>Meet at Foo HQ at 12:30!</Text> </Body> </Envelope>
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.