16.1 copyright © the mcgraw-hill companies, inc. permission required for reproduction or display....

59
16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and S/MIME

Upload: joan-nelson

Post on 28-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 16

Security at the Application Layer:

PGP and S/MIME

Page 2: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.2

Objectives

To explain the general structure of an e-mail application program

To discuss how PGP can provide security services for e-mail

To discuss how S/MIME can provide security services for e-mail

To define trust mechanism in both PGP and S/MIME

To show the structure of messages exchanged in PGP and S/MIME

Chapter 16

Page 3: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.3

16-1 E-MAIL16-1 E-MAIL

Let us first discuss the electronic mail (e-mail) system Let us first discuss the electronic mail (e-mail) system in general.in general.

16.1.1 E-mail Architecture16.1.2 E-mail Security

Topics discussed in this section:Topics discussed in this section:

Page 4: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.4

16.1.1 E-mail Architecture

Figure 16.1 E-mail architecture

Page 5: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.5

16.1.2 E-mail Security

Cryptographic AlgorithmsCryptographic Algorithms

In e-mail security, the sender of the message needs to include the name or identifiers

of the algorithms used in the message.

Note

CertificatesCertificatesIt is obvious that some public-key algorithms must be It is obvious that some public-key algorithms must be used for e-mail security. used for e-mail security.

Page 6: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.6

16.1.2 Continued

Cryptographic SecretsCryptographic Secrets

In e-mail security, the encryption/decryption is done using a symmetric-key algorithm,

but the secret key to decrypt the message is encrypted with the public key of the

receiver and is sent with the message.

Note

Page 7: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.7

16-2 PGP16-2 PGP

Pretty Good Privacy (PGP) can be used to create a Pretty Good Privacy (PGP) can be used to create a secure e-mail message or to store a file securely for secure e-mail message or to store a file securely for future retrieval.future retrieval.

16.2.1 Scenarios16.2.2 Key Rings16.2.3 PGP Certificates16.2.4 Key Revocation16.2.5 Extracting Information from Rings16.2.6 PGP Packets16.2.7 PGP Messages

Topics discussed in this section:Topics discussed in this section:

Page 8: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.8

16.2.1 ScenariosPlaintextPlaintext

Figure 16.2 A plaintext message

Page 9: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.9

16.2.1 ContinuedMessage IntegrityMessage Integrity

Figure 16.3 An authenticated message

Page 10: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.10

16.2.1 ContinuedCompressionCompression

Figure 16.4 A compressed message

Page 11: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.11

16.2.1 ContinuedConfidentiality with One-Time Session KeyConfidentiality with One-Time Session Key

Figure 16.5 A confidential message

Page 12: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.12

16.2.1 Continued

Code ConversionCode ConversionAnother service provided by PGP is code conversion. Another service provided by PGP is code conversion. PGP uses Radix-64 conversion. PGP uses Radix-64 conversion.

SegmentationSegmentationPGP allows segmentation of the message.PGP allows segmentation of the message.

Page 13: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.13

16.2.2 Key Rings

Figure 16.6 Key rings in PGP

Page 14: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.14

16.2.2 ContinuedPGP AlgorithmsPGP Algorithms

Page 15: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.15

16.2.2 Continued

Page 16: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.16

16.2.2 Continued

Page 17: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.17

16.2.2 Continued

Page 18: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.18

16.2.3 PGP Certificates

X.509 CertificatesX.509 CertificatesProtocols that use X.509 certificates depend on the Protocols that use X.509 certificates depend on the hierarchical structure of the trust.hierarchical structure of the trust.

In X.509, there is a single path from the fully trusted authority to any certificate.

Note

Page 19: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.19

16.2.3 Continued

PGP CertificatesPGP CertificatesIn PGP, there is no need for CAs; anyone in the ring In PGP, there is no need for CAs; anyone in the ring can sign a certificate for anyone else in the ring.can sign a certificate for anyone else in the ring.

In PGP, there can be multiple paths from fully or partially trusted authorities to any subject.

Note

Trusts and LegitimacyTrusts and LegitimacyThe entire operation of PGP is based on The entire operation of PGP is based on introducer introducer trusttrust, the , the certificate trustcertificate trust, and the , and the legitimacy of the legitimacy of the public keyspublic keys..

Page 20: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.20

16.2.3 Continued

Figure 16.7 Format of private key ring table

Page 21: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.21

16.2.3 Continued

Let us show a private key ring table for Alice. We assume that Alice has only two user IDs, [email protected] and [email protected]. We also assume that Alice has two sets of private/public keys, one for each user ID.

Example 16.1

Page 22: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.22

16.2.3 Continued

Figure 16.8 Format of a public key ring table

Page 23: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.23

16.2.3 Continued

A series of steps will show how a public key ring table is formed for Alice.

Example 16.2

Page 24: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.24

16.2.3 ContinuedExample 16.2 Continued

Page 25: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.25

16.2.3 ContinuedExample 16.2 Continued

Page 26: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.26

16.2.3 ContinuedExample 16.2 Continued

Page 27: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.27

16.2.3 ContinuedTrust Model in PGPTrust Model in PGP

Figure 16.9 Trust model

Page 28: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.28

16.2.4 Key Revocation

It may become necessary for an entity to revoke his or It may become necessary for an entity to revoke his or her public key from the ring. This may happen if the her public key from the ring. This may happen if the owner of the key feels that the key is compromised owner of the key feels that the key is compromised (stolen, for example) or just too old to be safe. (stolen, for example) or just too old to be safe.

Page 29: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.29

16.2.5 Extracting Information from RingsFigure 16.10 Extracting information at the sender site

Page 30: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.30

16.2.5 Continued

Figure 16.11 Extracting information at the receiver site

Page 31: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.31

16.2.6 PGP Packets

Figure 16.12 Format of packet header

Page 32: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.32

16.2.6 Continued

Page 33: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.33

16.2.6 ContinuedFigure 16.13 Literal data packet

Page 34: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.34

16.2.6 ContinuedFigure 16.14 Compressed data packet

Page 35: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.35

16.2.6 ContinuedFigure 16.15 Encrypted data packet

Page 36: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.36

16.2.6 ContinuedFigure 16.16 Signature packet

Page 37: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.37

16.2.6 Continued

Page 38: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.38

16.2.6 ContinuedFigure 16.17 Session-key packet

Page 39: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.39

16.2.6 ContinuedFigure 16.18 Public-key packet

Public KeyPublic Key

Page 40: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.40

16.2.6 ContinuedFigure 16.19 User ID packet

Page 41: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.41

16.2.7 PGP Messages

Figure 16.20 Encrypted message

Page 42: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.42

16.2.7 Continued

Figure 16.21 Signed message

Page 43: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.43

16.2.7 Continued

Figure 16.22 Certificate message

Page 44: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.44

16-3 S/MIME16-3 S/MIME

Another security service designed for electronic mail is Another security service designed for electronic mail is Secure/Multipurpose Internet Mail Extension Secure/Multipurpose Internet Mail Extension (S/MIME). The protocol is an enhancement of the (S/MIME). The protocol is an enhancement of the Multipurpose Internet Mail Extension (MIME) Multipurpose Internet Mail Extension (MIME) protocol.protocol.

16.3.1 MIME16.3.2 S/MIME16.3.3 Applications of S/MIME

Topics discussed in this section:Topics discussed in this section:

Page 45: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.45

16.3.1 Continued

Figure 16.23 MIME

Page 46: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.46

16.3.1 Continued

Figure 16.24 Teledesic

Page 47: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.47

16.3.1 Continued

MIME-VersionMIME-VersionThis header defines the version of MIME used. The This header defines the version of MIME used. The current version is 1.1.current version is 1.1.

Content-TypeContent-TypeThe content type and the content subtype are separated The content type and the content subtype are separated by a slash. Depending on the subtype, the header may by a slash. Depending on the subtype, the header may contain other parameters.contain other parameters.

Page 48: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.48

16.3.1 Continued

Page 49: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.49

16.3.1 Continued

Page 50: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.50

16.3.1 Continued

Figure 16.25 Radix-64 conversion

Page 51: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.51

16.3.1 Continued

Page 52: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.52

16.3.1 Continued

Figure 16.26 Quoted-printable

Page 53: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.53

16.3.2 S/MIME

S/MIME adds some new content types to include S/MIME adds some new content types to include security services to the MIME. All of these new types security services to the MIME. All of these new types include the parameter “application/pkcs7-mime,” in include the parameter “application/pkcs7-mime,” in which “pkcs” defines “which “pkcs” defines “Public Key Cryptography Public Key Cryptography Specification.”Specification.”

Cryptographic Message Syntax (CMS)Cryptographic Message Syntax (CMS)To define how security services, such as confidentiality To define how security services, such as confidentiality or integrity, can be added to MIME content types, or integrity, can be added to MIME content types, S/MIME has defined Cryptographic Message Syntax S/MIME has defined Cryptographic Message Syntax (CMS). The syntax in each case defines the exact (CMS). The syntax in each case defines the exact encoding scheme for each content type. For details, encoding scheme for each content type. For details, the reader is referred to the reader is referred to RFC 3369RFC 3369 and and 33703370..

Page 54: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.54

16.3.2 Continued

Figure 16.27 Signed-data content type

Page 55: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.55

16.3.2 ContinuedFigure 16.28 Enveloped-data content type

Page 56: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.56

16.3.2 Continued

Figure 16.29 Digest-data content type

Page 57: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.57

16.3.2 ContinuedFigure 16.30 Authenticated-data content type

Page 58: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.58

16.3.2 Continued

Cryptographic AlgorithmsCryptographic AlgorithmsS/MIME defines several cryptographic algorithms. S/MIME defines several cryptographic algorithms. The term “The term “mustmust” means an absolute requirement; the ” means an absolute requirement; the term “term “shouldshould” means recommendation.” means recommendation.

Page 59: 16.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 16 Security at the Application Layer: PGP and

16.59

16.3.2 Continued

The following shows an example of an enveloped-data in which a small message is encrypted using triple DES.

Example 16.3