Electronic Mail Security: Pretty Good Privacy (PGP)
Electronic Mail Security: Pretty Good Privacy (PGP)
18 CEC, Perunad
S8_CS_Security in Computing _ Module 4 NETWORK & APPLICATION SECURITY
v) The receiver generates a new hash code for the message and compares it with the
decrypted hash code. If the two match, the message is accepted as authentic.
Source A Destination B
E [PRa, H (M)] PUa
PRa
DP
M H || Z Z-1
EP M Compare
H
Fig. 4.10 Authentication
2) Confidentiality
Confidentiality is provided by encrypting message to be transmitted. For this the
symmetric key algorithm CAST-128 may be used. This includes the following steps:
i) The sender generates a message and a random 128-bit number to be used as a
session key for this message only.
ii) The message is encrypted, using CAST-128 or IDEA with the session key.
iii) The session key is encrypted with RSA, using the recipient’s public key, and is
prepended to the message.
iv) The receiver uses RSA with its private key to decrypt and recover the session key.
v) The session key is used to decrypt the message.
Source A PUb
Destination B
E [PUb, Ks] PRb
EP
Ks
M DP
Z EC ||
M
DC Z-1
Fig. 4.11 Confidentiality
3) Compression
As a default, PGP compress the message after applying the signature but before
encryption. This has the benefit of saving space both for e-mail transmission and for file
storage. (*In figure, compression is denoted by Z and decompression is denoted by –Z.)
The signature is generated before compression for two reasons:
ü It is preferable to sign an uncompressed message so that one can store only the
uncompressed message together with the signature for future verification
ü The PGP compression algorithm is not deterministic; various implementations of
the algorithm achieve different tradeoffs in running speed versus compression ratio and,
as a result produce different compressed forms.
19 CEC, Perunad
S8_CS_Security in Computing _ Module 4 NETWORK & APPLICATION SECURITY
No No
No
No
Convert to radix 64
20 CEC, Perunad
S8_CS_Security in Computing _ Module 4 NETWORK & APPLICATION SECURITY
S/MIME
S/MIME (Secure/Multipurpose Internet Mail Extension) is a security enhancement to
the MIME Internet e-mail format standard, based on technology from RSA data security.
RFC 822 – It defines a format for text message that are sent using electronic mail. In this
context, messages are viewed as having an envelope and contents. The envelope contains
whatever information is needed to accomplish transmission and delivery. The contents
compose the object to be delivered to the recipient.
21 CEC, Perunad
S8_CS_Security in Computing _ Module 4 NETWORK & APPLICATION SECURITY
Overview of MIME
The MIME specification includes the following elements:
1. Five new message header fields are defined. These fields provide information about the
body of the message.
2. A number of content formats are defined, thus standardizing representations that
support multimedia electronic mail.
3. Transfers encoding are defined that enable the conversion of any content format into a
form that is protected from alteration by the mail system.
22 CEC, Perunad
S8_CS_Security in Computing _ Module 4 NETWORK & APPLICATION SECURITY
7 bit The data are all represented by short lines of ASCII characters.
8 bit The lines are short, but there may be non-ASCII characters
Binary Not only may non- ASCII characters be present but the lines are not
necessarily short enough for SMTP transport
quoted- Encodes the data in such a way that if the data being encoded are
printable mostly ASCII text, the encoded form of the data remains largely
recognizable by humans
23 CEC, Perunad
S8_CS_Security in Computing _ Module 4 NETWORK & APPLICATION SECURITY
S/MIME Functionality
S/MIME provides the following functions
1) Enveloped data: This consists of encrypted content of any type and encrypted content
encryption keys for one or more recipients.
The steps for preparing an enveloped data are follows
i) Generate a pseudorandom session key for a particular symmetric encryption
algorithm.
ii) For each recipient, encrypt the session key with the recipient’s public key
iii) For each recipient, prepare a block known as RecipientInfo that contains an
identifier of the recipient’ public key certificate, an identifier of the algorithm used
to encrypt the session key and the encrypted session key.
iv) Encrypt the message content with the session key.
2) Signed data: A digital signature is formed by taking the message digest of the content to
be signed and then encrypting that with the private key of the signer. A signed data
message can only be viewed by a recipient with S/MIME capability.
The steps for preparing a signed data are follows
i) Select a hash algorithm
ii) Compute the hash of the content to be signed.
iii) Encrypt the hash with the signer’s private key.
iv) Prepare a block known as SignerInfo that contains the signer’s public key
certificate, an identifier of the hash algorithm, an identifier of the encryption
algorithm and the encrypted hash.
3) Clear signed data: As with signed data a digital signature of the content is formed.
However, in this case, only the digital signature is encoded using base64. As a result,
recipients without S/MIME capability can view the message content, although they cannot
verify the signature.
4) Signed and Enveloped data: Signed-only and encrypted-only entities may be nested, so
that encrypted data may be signed and signed data or clear signed data may be encrypted.
24 CEC, Perunad