When do we need to use Digital Signature in email and why? As sender want to show that the email is sent by him and data integrity, why don't we use Digital Signature in every letter? Thank you.
TL;DR: Only sign E-Mails that you don't need plausible deniability for and where you know that the receiver(s) have the ability to verify the correctness of the signature.
Digital Signatures are used for three purposes:
- Authentication: Only the person in possession of the secret key is able to create the signature, therefore proving the signer's identity
- Integrity: It is computationally infeasible for an attacker (that is not in possession of the secret key) to modify the message and compute a valid signature for it. By checking the signature, the receiver can reliably check whether any modifications were made to the message
- Non-repudiation: Unlike MACs, a signature can be verified by everyone who has the corresponding public key. This means that the sender cannot deny having sent the message.
The sender of an E-Mail might wish to sign its content to achieve one ore more of the above security goals. A reason to not sign an email could be if one of those goals is in conflict with the senders interest (e.g., sender wishes to have plausible deniability of having sent the E-Mail). Additionally, the correctness of the signature depends on the following condition, which cannot always be met:
- Authentic channel for public key retrieval: The signature can only be verified if the verifier is in possession of the sender's public key. Simply sending the public key as an attachment with the E-Mail doesn't cut it. But having an authentic copy of the public key of each person you could potentially receive an E-Mail from is not very practical.
PGP and S/MIME are both trying to facilitate the retrieval of public keys in different ways (Web of Trust, Certificate Authorities). However, it still remains difficult in practice to make sure that all receivers have the public key of sender. Another factor is that the receiver has to also be able to perform the verification algorithm. Standard mail clients have this option not built in so that the receiver has to install additional Software /Add-ons (e.g., Enigmail for Thunderbird).
One could argue now that you could still sign every E-Mail regardless of whether the receiver is able to verify that signature or not. This can however give the receiver a false sense of security and can be exploited by an attacker. For example, if one of your friends is used to receiving E-Mails from you that are signed but he is too lazy or lacks the knowledge to verify that signature, an attacker could send him an E-Mail with a spoofed address and a bogus signature. Your friend would have a false sense of security since the E-Mail would appear to come from your E-Mail address and signed by you.