Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

27
Chapter 15 Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili

Transcript of Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

Page 1: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

Chapter 15Chapter 15Electronic Mail Security – Part II

Data & Network Security

Spring 2006

Dr. Jalili

Page 2: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

2

AgendaAgenda

In the previous session, we’ve studied PGP. In this session, other email security standards will be studied.

PEM S/MIME

RFC 822 MIME

Page 3: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

3

Phil’s feelingsPhil’s feelings

…a week before PGP's first release, I discovered the existence of another email encryption standard called Privacy Enhanced Mail (PEM), which was backed by several big companies, as well as RSA Data Security.

I didn't like PEM's design, for several reasons…

Page 4: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

4

Why not PEM?!Why not PEM?!

1. PEM used 56-bit DES to encrypt messages, which I did not regard as strong cryptography.

2. PEM absolutely required every message to be signed, and revealed the signature outside the encryption envelope, so that the message did not have to be decrypted to reveal who signed it.

Not an issue today

Page 5: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

5

PEM StandardPEM Standard

PEM is described in RFCs 1421-1424: Privacy Enhancement for Internet Electronic Mail (1993):

1. Part I: Message Encryption and Authentication Procedures;

2. Part II: Certificate-Based Key Management;

3. Part III: Algorithms, Modes, and Identifiers;

4. Part IV: Key Certification and Related Services.

Page 6: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

6

Summary of Transformations Summary of Transformations

The incoming/outgoing message undergoes (a subset of) the four-phase transformation:

Message in the system's

native character set

RFC 822 compatible

Authentication &

Encryption

Printable Encoding

Page 7: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

7

PEM EncapsulationPEM Encapsulation

Adopted from RFC 934 encapsulation mechanism.

Uses Encapsulation Boundaries (EBs):

-----BEGIN PRIVACY-ENHANCED MESSAGE-----

-----END PRIVACY-ENHANCED MESSAGE-----

Page 8: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

8

Encapsulation FormatEncapsulation Format

Encapsulated Message

-----BEGIN PRIVACY-ENHANCED MESSAGE-----

Encapsulated Header Portion

Blank Line

Encapsulated Text Portion

-----END PRIVACY-ENHANCED MESSAGE-----

Pre-Encapsulation

Boundary (Pre-EB)

Post-Encapsulation

Boundary (Post-EB)

Separates Header &

Body

Result of four-phase

transformation

Contains encryption

control fields

Page 9: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

9

Example Encapsulated Message Example Encapsulated Message (Symmetric Case)(Symmetric Case)

Pre-EBHeader

Body

Post-EB

Page 10: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

10

Proc-Type FieldProc-Type Field

Identifies the type of processing performed on the transmitted message: ENCRYPTED; MIC-ONLY; MIC-CLEAR; CRL; Content-Domain Field; DEK-Info Field;

MIC:Message Integrity

Check

DEK:Data Encrypting

Keys

Page 11: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

11

PEM AlgorithmsPEM Algorithms

Page 12: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

12

PEM, TodayPEM, Today

Today, PEM is not used as a mail security/privacy tool anymore.

But, as stated in RFC 2315 (PKCS #7: Cryptographic Message Syntax v1.5), PEM & PKCS #7 are totally compatible. PKCS#7 messages can be converted into PEM messages without any cryptographic operations.

Page 13: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

13

S/MIMES/MIME

Before studying S/MIME, one must first understand what RFC 822 & MIME are.

RFC 822 defines a format for text messages that are sent using electronic mail.

Consists of envelope & contents. The content includes a set of header

fields that may be used by the mail system to create the envelope.

Page 14: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

14

RFC 822 Message FormatRFC 822 Message Format

Date: Tue, 9 May 2006 10:37:17 (EST)

From: “Mahmood Ahmadinejad” <[email protected]>

Subject: no subject

To: [email protected]

Cc:

Mr. George Bush, president of the United States of America

For some time now, I have been thinking, how one can justify the undeniable contradictions that exist in the international arena -- which are being constantly debated, especially in political forums and amongst university students. Many questions remain unanswered. Those have prompted me to discuss some of the contradictions and questions, in the hopes that it might bring about an opportunity to redress them…

Blank Line

Page 15: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

15

RFC 822 SMTP limitationsRFC 822 SMTP limitations

1. Binary object transfer;2. Non-ASCII-7 encoding;3. Message size limitations;4. ASCII-to-EBCDIC translation;5. SMTP gateways to X.400 email

networks can’t handle non-textual X.400 messages;

6. Some SMTP implementations inconsistent with RFC 821 SMTP.

1. Handling CRLF;2. 76-Character lines;3. Trailing white spaces;4. Padding of lines;5. Handling Tab

characters.

Page 16: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

16

MIMEMIME

RFCs 2821-2822 obsolete RFCs 821-822.

MIME =Multipurpose Internet Mail Extensions.

An extension to the RFC 822 framework.

Intended to address some of the problems and limitations of the use of SMTP.

Page 17: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

17

MIME RFCsMIME RFCs

MIME is discussed in RFCs 2045-2049: 2045: Format of Internet Message Bodies; 2046: Media Types; 2047: Message Header Extensions for Non-

ASCII Text; 2048: Registration Procedures; 2049: Conformance Criteria and Examples;

Page 18: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

18

MIME SpecificationMIME Specification

1. Five new message header fields are defined, which may be included in an RFC 822 header.

2. A number of content formats for multimedia electronic mail are defined.

3. Transfer encodings are defined that enable the conversion of any content format into a form that is protected from alteration by the mail system.

Page 19: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

19

New Message HeadersNew Message Headers

1. MIME-Version;

2. Content-Type;

3. Content-Transfer-Encoding;

4. Content-ID;

5. Content-Description.

Always 1.0RFCs 2045-2046e.g.

video/quicktime

e.g.binaryUsed to identify MIME

entities uniquely in multiple contexts.Like <alt>

tags

Page 20: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

20

MIME Content Types (RFC 2046)MIME Content Types (RFC 2046)

Page 21: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

21

Sample MIME MessageSample MIME Message

From: “Mahmood Ahmadinejad” <[email protected]>

To: “George W. Bush” <[email protected]>

Subject: no subject

MIME-Version: 1.0

Content-type: multipart/mixed; boundary=“Mr. President”

Preamble

--Mr. PresidentYou might know that I am a teacher. My students ask me how can these actions be reconciled with the values…

--Mr. President

Content-type: text/plain; charset=us-asciiI am sure you know how -- and at what cost -- Israel was established…

--Mr. President--

Epilogue

Blank Line

Page 22: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

22

MIME Transfer EncodingsMIME Transfer Encodings

Page 23: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

23

Canonical FormCanonical Form

An important concept in MIME and S/MIME.

Canonical form is a format, appropriate to the content type, that is standardized for use between systems.

May involve character set and EOL conversion, transformation of audio data, compression, etc.

Page 24: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

24

S/MIMES/MIME

Secure MIME (RFCs 2632-2634). Provides four functions:

1. Enveloped data;

2. Signed data;

3. Clear-Signed data;

4. Signed & Enveloped data.

Both message & signature are

encoded using Base64.

Only signature is encoded

using Base64.

Page 25: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

25

S/MIME AlgorithmsS/MIME Algorithms

DSS: preferred for digital signature. DH (ElGamal): preferred for session key

encryption. RSA: signing and/or encryption. 3DES/RC2 (40 bits): message encryption. SHA-1/MD5: digest.

There are some RULES for algorithm selection (MUST/SHOULD).

RFC 2119

Page 26: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

26

S/MIME Content Types

Page 27: Chapter 15 Electronic Mail Security – Part II Data & Network Security Spring 2006 Dr. Jalili.

27

S/MIME Certificate ProcessingS/MIME Certificate Processing

S/MIME uses public-key certificates that conform to X.509v3.

The key-management scheme used by S/MIME is in some ways a hybrid between a strict X.509 certification hierarchy and PGP's web of trust.

PGP is suitable for personal use, while S/MIME is appropriate for commercial use.