Module 4 Electronic Mail Security
Module 4 Electronic Mail Security
Security
Overview
19-2
Motivation for E-mail Security
• Electronic mail (E-mail) is one of the widely used and
regarded network –based application in virtually all
distributed environments.
• Currently, message contents are not secure.
– May be inspected either in transit or by suitably privileged users on
destination systems
• Requirements for E-mail Security
– Confidentiality: protection from disclosure
– Authentication of sender of message
– Message integrity: protection from modification
– Non-repudiation of origin: protection from denial by
• PGPsender
(Pretty Good Privacy) and S/MIME (Secure Multi-purpose
Internet Mail Extensions) are the two commonly used E-mail
Security Standards. DKIM is a third e-mail security standard.
E-mail Security Standards
• Pretty Good Privacy (PGP), Secure Multi-purpose Internet Mail
Extensions
(S/MIME) and Domain Keys Identified Mail (DKIM)
• Both PGP and S/MIME provide confidentiality and authentication services that can
be used for E-mail and file storage applications.
• PGP was originally designed for plaintext messages; S/MIME handles all sorts of
data files (for e.g., spreadsheets, graphics, presentations, movies, and sound) and is
integrated into many commercial e-mail packages – hence S/MIME is likely to
dominate the secure e-mail market.
• With PGP, each user is free to decide on the level of trust for a public key of a
remote user (usually done based on a “web of trust” among the users) and not
done through a centralized Certificate Authority (CA) to issue certificates for the
• public keys.
• S/MIME uses the standard public-key certificates issued by a CA. S/MIME also
provides several options for the algorithms to be used for confidentiality and
authentication services; whereas PGP is fixed with respect to the
• algorithms that can be used.
Support for S/MIME is built-in to most of the standard browsers; while PGP
typically requires a user to download and install one or more plug-ins.
PGP Operation – Authentication
1. Sender creates message
2. Make SHA-1 160-bit hash of message
3. Attached RSA signed hash to message
4. Receiver decrypts & recovers hash code
5. Receiver verifies received message hash
19-5
PGP for Authentication
ZIP [M || EPri-Sender(H(M)) ]
| | Z Z-1 H
M M
PRS PUS
Compare
H EP DP
H(M) H(M)
Source (adapted from): Figure 18.1 (a), from William Stallings – Cryptography and Network Security, 5th
Edition
PGP Operation – Confidentiality
1. Sender forms 128-bit random session key
2. Encrypts message with session key
3. Attaches session key encrypted with RSA
4. Receiver decrypts & recovers session key
5. Session key is used to decrypt message
19-6
PGP for Confidentiality
PUR
Source Side Destination
Side
KS EP DC Z-1
M
M Z EC || KS
KS DP
Note that with PGP, the secret key
is generated for each message E(PUR,KS)
PRR
Source (adapted from): Figure 18.1 (b), from William Stallings – Cryptography and Network Security, 5th
Edition
Confidentiality & Authentication
19-7
PGP for Authentication and Confidentiality
PUR
EC DC Z-1
| |
M
Z KS PUS
H(M) H(M)
KS DP DP
| |
M Compare H
PR S PR R
H EP
Source (adapted from): Figure 18.1 (c), from William Stallings – Cryptography and Network Security, 5th
Edition
PGP Operation – Compression
By default PGP compresses message after signing but before
encrypting
Uncompressed message & signature can be stored for later
verification
Compression is non deterministic
Uses ZIP compression algorithm
19-8
PGP Keys
• PGP Session Key
• The session key is associated with a single message and is used only for the
purpose of encrypting and decrypting that message.
• IDEA uses a 128-bit symmetric key.
• Session keys are generated using the ANSI X12.17 generator, based on
keystroke input from the user, where both the keystroke timing and the
actual keys struck are used to generate a randomized stream of numbers
constituting the key.
• PGP Public and Private Keys
• Since many public/private keys may be in use with PGP, there is a need to
identify which key is actually used to encrypt the session key for any specific
message.
• Since, it would be inefficient to send the full public-key with every message,
PGP uses a key identifier based on the least significant 64-bits of the key,
which will very likely be unique. Then only the much shorter key ID would
need to be transmitted with any message.
• A key ID is also required for the PGP digital signature.
PGP Operation – Email Compatibility
PGP segments messages if too big
PGP produces binary (encrypted) data & appends a CRC
Email was designed only for text
Need to encode binary into printable ASCII characters
Uses radix-64 or base-64 algorithm
Maps 3 bytes to 4 printable chars: 26 upper case
lowercase
alphabets, 26 alphabets, 10 numbers, +, \
Ref: http://en.wikipedia.org/wiki/Base64
19-9
PGP Operation – Summary
19-10
PGP Session Keys
Need a session key of varying sizes for each
message:
56-bit DES,
168-bit Triple-DES
19-11
PGP Public & Private Keys
Users are allowed to have multiple public/private
keys
⇒ Need to identify which key has been used
Use a key identifier = Least significant 64-bits of the key
19-12
PGP Message Format
19-13
PGP Key Rings
Private keys encrypted by a passphrase
Public keys of all correspondents
19-14
PGP Message Generation
19-15
PGP Message Reception
19-16
Web of Trust
There is no need to buy certificates from
companies
A user can sign other user’s certificates
If you trust someone, you can trust users
that they sign for.
You can assign a level of trust to each user and hence to the
certificate they sign for
For example,
A certificate that is signed by a fully trusted user is fully
trusted
A certificate signed by two half trusted users is fully
trusted
A certificate signed by one half trusted user is half trusted
19-17
PGP Trust Model Example
DEFL are trusted
AB re half trusted
S is untrusted
19-18
Certificate Revocation
Owners can revoke public key by issuing a
“revocation” certificate signed with the revoked
private key
New Web-of-trust certificates have expiry dates
19-19
S/MIME
Secure/Multipurpose Internet Mail
Extensions
Original Internet RFC822 email was
text only
MIME for varying content types and
multi-part messages
With encoding of binary data to
textual form
S/MIME added security
enhancements
Enveloped data: Encrypted
content and associated keys
Signed data: Encoded message +
signed digest
Clear-signed data: Clear text
19-20message + encoded signed
S/MIME
Create a Random
Plaintext
Session Key, KSession Hashing
Algorithm
Symmetric
Encrypt with the
Key Encryption Hash (Plaintext)
Recipient’s Public Key
EPub-Rcvr
Encrypted with Encrypt with the
KSession Sender’s Private Key
Encrypted with
Plaintext EPri-Send
EPub-Rcvr
KSession
Encrypted with
EPri-Send
19-22
S/MIME Messages
S/MIME secures a MIME entity with a signature, encryption,
or both
Forming a MIME wrapped PKCS object
(Public Key Cryptography Standard originally by RSA Inc
Now by IETF)
Type Subtype Smime parameter Meaning
Multipart Signed clear msg w
signature Application Pkcs7-mime signedData Signed
entity Application Pkcs7-mime envelopedData Encrypted
entity Application Pkcs7-mime Degenerate signedData Certificate only
Application Pkcs7-mime CompressedData Compressed entity
Application Pkcs7-signature signedData Signature
Content-Type: application/pklcs7-mime; smime-type=signedData; name=smime.p7m
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7m
Ref: http://en.wikipedia.org/wiki/PKCS
19-23
S/MIME Certificate Processing
S/MIME uses X.509 v3 certificates
Managed using a hybrid of a strict X.509 CA hierarchy and
enterprise’s CAs
Each client has a list of trusted CA’s certificates and his own
public/private key pairs & certificates
Several types of certificates with different levels of checks:
Class 1: Email and web browsing
Class 2: Inter-company email
Class 3: Banking, …
19-24
S/MIME Enhanced Security Services
19-25
Domain Keys Identified Mail
Emails signed by the
enterprise, e.g. WUSTL
rather than the sender
Company’s mail system
signs the message
So spammers cannot fake
that companies email
addresses
Ref: http://en.wikipedia.org/wiki/DKIM
19-26
Domain Keys Identified Mail (DKIM)
• With DKIM, an e-mail message is signed using the private key of
the administrative domain from which the e-mail originates
(not signed with the private key of the individual user, as in
PGP and S/MIME).
• DKIM is transparent to the end-users as the e-mail is signed
by the Mail Submission Agent (MSA) of the sender’s domain
and validated by the Mail Delivery Agent (MDA) of the
recipient’s domain.
• At the receiving end, the MDA can access the public key of the
sender’s administrative domain (through DNS query) and
verify the authenticity of the message.
• E-mails that claim to originate from a particular domain – but,
not signed with the private key of the administrative domain
– are rejected.
• The default signing algorithm is RSA with SHA-256.
DKIM Functional Flow
19-27
DKIM