Вы находитесь на странице: 1из 76

Electronic Mail Security

 Security Services for E-mail


 attacks possible through E-mail
 establishing keys privacy
 authentication of the source
 Message Integrity
 Non-repudiation
 Pretty Good Privacy
 S/MIME.
Security Services

• Three enhanced security services have been


proposed in an Internet draft:
– Signed receipt
• Returning a signed receipt provides proof of delivery to the
originator of a message and allows the originator to
demonstrate to a third party that the recipient received the
message
– Security labels
• A set of security information regarding the sensitivity of the
content that is protected by S/MIME encapsulation
– Secure mailing lists
• An S/MIME Mail List Agent (MLA) can take a single incoming
message, perform the recipient-specific encryption for each
recipient, and forward the message
DomainKeys Identified Mail (DKIM)

• A specification for cryptographically signing e-mail


messages, permitting a signing domain to claim
responsibility for a message in the mail stream
• Message recipients can verify the signature by
querying the signer’s domain directly to retrieve
the appropriate public key and can thereby
confirm that the message was attested to by a
party in possession of the private key for the
signing domain
• Proposed Internet Standard RFC 4871
• Has been widely adopted by a range of e-mail
providers and Internet Service Providers (ISPs)
E-mail Threats
• RFC 4684 (Analysis • Characterized on three
of Threats levels of threat:
Motivating
The most sophisticated and financially
DomainKeys motivated senders of messages are those
who stand to receive substantial financial

Identified Mail) benefit, such as from an e-mail based


fraud scheme

– Describes the threats


being addressed by The next level are professional senders of
bulk spam mail and often operate as
DKIM in terms of the commercial enterprises and send
messages on behalf of third parties
characteristics,
capabilities, and
location of potential At the low end are attackers who simply
want to send e-mail that a recipient does
not want to receive
attackers
Pretty Good Privacy (PGP)
• Provides a confidentiality and authentication service
that can be used for electronic mail and file storage
applications
• Developed by Phil Zimmermann
– Selected the best available cryptographic algorithms as
building blocks
– Integrated these algorithms into a general-purpose
application that is independent of operating system and
processor and that is based on a small set of easy-to-use
commands
– Made the package and its documentation, including the
source code, freely available via the Internet, bulletin
boards, and commercial networks
– Entered into an agreement with a company to provide a
fully compatible, low-cost commercial version of PGP
PGP Growth

It is available free worldwide in versions that run on a variety of platforms

The commercial version satisfies users who want a product that comes with
vendor support

It is based on algorithms that have survived extensive public review and are
considered extremely secure

It has a wide range of applicability

It was not developed by, nor is it controlled by, any governmental or


standards organization

Is now on an Internet standards track, however it still has an aura of an


antiestablishment endeavor
Table 19.1
Summary of PGP Services
PGP Authentication
• Combination of SHA-1 and RSA provides an
effective digital signature scheme
– Because of the strength of RSA the recipient is
assured that only the possessor of the matching
private key can generate the signature
– Because of the strength of SHA-1 the recipient is
assured that no one else could generate a new
message that matches the hash code
– As an alternative, signatures can be generated using
DSS/SHA-1
– Detached signatures are supported
– Each person’s signature is independent
and therefore applied only to the document
PGP Confidentiality
• Provided by encrypting messages to be transmitted or to be
stored locally as files
– In both cases the symmetric encryption algorithm CAST-128
may be used
– Alternatively IDEA or 3DES may be used
– The 64-bit cipher feedback (CFB) mode is used
In PGP each symmetric key is used only once

• Although referred to as a session key, it is in reality a one-


time key
• Session key is bound to the message and transmitted with it
• To protect the key, it is encrypted with the receiver’s public
key

– As an alternative to the use of RSA for key encryption, PGP uses


ElGamal, a variant of Diffie-Hellman that provides
encryption/decryption
PGP Confidentiality and
Authentication
• Both services may be used for the same message
– First a signature is generated for the plaintext
message and prepended to the message
– Then the plaintext message plus signature is
encrypted using CAST-128 (or IDEA or 3DES) and the
session key is encrypted using RSA (or ElGamal)
• When both services are used:

The sender first And finally encrypts


Then encrypts the
signs the message the session key with
message with a
with its own private the recipient’s
session key
key public key
PGP Compression
• As a default, PGP compresses 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
– The placement of the compression algorithm is
critical
• Applying the hash function and signature after
compression would constrain all PGP implementations to
the same version of the compression algorithm
• Message encryption is applied after compression to
strengthen cryptographic security
– The compression algorithm used is ZIP
PGP E-mail Compatibility

• Many electronic mail systems only permit


the use of blocks consisting of ASCII text
– To accommodate this restriction, PGP
provides the service of converting the raw 8-
bit binary stream to a stream of printable
ASCII characters
– The scheme used for this purpose is radix-64
conversion
• Each group of three octets of binary data is
mapped into four ASCII characters
• This format also appends a CRC to detect
Secure/Multipurpose Internet Mail
Extension (S/MIME)
• A security enhancement to the MIME
Internet e-mail format standard based on
technology from RSA Data Security
• Defined in:
– RFCs 3370, 3850, 3851, 3852
Multipurpose Internet Mail
Extensions (MIME)
MIME specification includes the following elements:
• An extension to the RFC 5322
framework that is intended to
address some of the problems
and limitations of the use of Transfer encodings Five new message
Simple Mail Transfer Protocol are defined that header fields are
(SMTP) enable the defined, which may
be included in an
– Is intended to resolve conversion of any
RFC 5322 header;
these problems in a content format into
a form that is these fields provide
manner that is compatible protected from information about
with existing RFC 5322 alteration by the the body of the
implementations mail system message
– The specification is
provided in RFCs 2045
through 2049 A number of content
formats are defined, thus
standardizing
representations that
support multimedia
electronic mail
The Five Header Fields Defined in
MIME
MIME-Version

• Must have the parameter value 1.0


• This field indicates that the message conforms to RFCs 2045 and 2046

Content-Type

• Describes the data contained in the body with sufficient detail that the receiving user agent
can pick an appropriate agent or mechanism to represent the data to the user or otherwise
deal with the data in an appropriate manner

Content-Transfer-Encoding

• Indicates the type of transformation that has been used to represent the body of the message
in a way that is acceptable for mail transport

Content-ID

• Used to identify MIME entities uniquely in multiple contexts

Content-Description

• A text description of the object with the body; this is useful when the object is not readable
Table 19.2

MIME
Content
Types
Table 19.3
MIME Transfer Encodings
Table 19.4
Native and Canonical Form
S/MIME Functionality
Enveloped data Signed data
• Consists of encrypted content of any type and • A digital signature is formed by taking the message
encrypted content encryption keys for one or more digest of the content to be signed and then
recipients encrypting that with the private key of the signer
• The content plus signature are then encoded using
base64 encoding
• A signed data message can only be viewed by a
recipient with S/MIME capability

S/MIME

Clear-signed data Signed and enveloped data


• Only the digital signature is encoded using base64 • Signed-only and encrypted-only entities may be
• As a result recipients without S/MIME capability nested, so that encrypted data may be signed and
can view the message content, although they signed data or clear-signed data may be encrypted
cannot verify the signature
Table
19.5
Cryptographic

Algorithms

Used in

S/MIME
Table 19.6
S/MIME Content Types
Securing a MIME Entity
• S/MIME secures a MIME entity with a
signature, encryption, or both
• The MIME entity is prepared according to the
normal rules for MIME message preparation
– The MIME entity plus some security-related data,
such as algorithm identifiers and certificates, are
processed by S/MIME to produce what is known
as a PKCS object
– A PKCS object is then treated as message content
and wrapped in MIME
• In all cases the message to be sent is
converted to canonical form
EnvelopedData
• The steps for preparing an envelopedData MIME
are:
Generate a pseudorandom session key for a particular symmetric
encryption algorithm

For each recipient, encrypt the session key with the recipient’s
public RSA key

For each recipient, prepare a block known as RecipientInfo


that contains an identifier of the recipient’s public-key certificate,
an identifier of the algorithm used to encrypt the session key,
and the encrypted session key

Encrypt the message content with the session key


SignedData

• The steps for preparing a


signedData MIME are:
Prepare a block
known as
Encrypt the SignerInfo
message digest with that contains the
the signer’s private signer’s public-key
key certificate, an
Compute the identifier of the
message digest (hash message digest
function) of the algorithm, an
content to be signed identifier of the
algorithm used to
Select a message encrypt the
digest algorithm message digest,
(SHA or MD5) and the encrypted
message digest
Clear Signing
• Achieved using the multipart content type
with a signed subtype
• This signing process does not involve
transforming the message to be signed
• Recipients with MIME capability but not
S/MIME capability are able to read the
incoming message
S/MIME Certificate Processing

• S/MIME uses public-key certificates that conform


to version 3 of X.509
• 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
• S/MIME managers and/or users must configure
each client with a list of trusted keys and with
certificate revocation lists
– The responsibility is local for maintaining the
certificates needed to verify incoming signatures and
to encrypt outgoing messages
• The certificates are signed by certification
authorities
User Agent Role
• An S/MIME user has several key-management functions to
perform:
Certificate storage and
Key generation Registration
retrieval

The user of some related A user’s public key must be A user requires access to a
administrative utility must be registered with a certification local list of certificates in
capable of generating separate authority in order to receive an order to verify incoming
Diffie-Hellman and DSS key pairs X.509 public-key certificate signatures and to encrypt
and should be capable of outgoing messages
generating RSA key pairs

A user agent should generate


RSA key pairs with a length in
the range of 768 to 1024 bits
and must not generate a length
of less than 512 bits
IP Security
 Overview of IPSec
 IP and IPv6
 Authentication Header (AH)
 Encapsulation Security Payload (ESP)
 Internet Key Exchange (Phases of IKE,
ISAKMP/IKE Encoding).
IP Security Overview
• RFC 1636
• “Security in the Internet Architecture”
• Issued in 1994 by the Internet Architecture Board
(IAB)
• Identifies key areas for security mechanisms
• Need to secure the network infrastructure from
unauthorized monitoring and control of network traffic
• Need to secure end-user-to-end-user traffic using
authentication and encryption mechanisms
• IAB included authentication and encryption as
necessary security features in the next
generation IP (IPv6)
• The IPsec specification now exists as a set of Internet
standards
Applications of IPsec
• IPsec provides the capability to secure
communications across a LAN, private and public
WANs, and the Internet • Secure branch office
connectivity over the
Internet
• Secure remote access
Examples over the Internet
• Establishing extranet
include: and intranet
connectivity with
partners
• Enhancing electronic
• Principal feature of IPsec is that it can
commerce encrypt
security
and/or authenticate all traffic at the IP level
• Thus all distributed applications (remote logon,
client/server, e-mail, file transfer, Web access) can be
secured
Encapsulating Security Payload Internet Key Exchange (IKE)
(ESP)
• A collection of documents
• Consists of an encapsulating describing the key
header and trailer used to management schemes for
provide encryption or use with IPsec
combined
encryption/authentication • The main specification is
RFC 5996, Internet Key
• The current specification is Exchange (IKEv2) Protocol,
RFC 4303, IP Encapsulating but there are a number of
Security Payload (ESP) related RFCs

Authentication Header (AH) Cryptographic algorithms


• An extension header to • This category encompasses
provide message a large set of documents
authentication that define and describe
• The current specification is cryptographic algorithms for
RFC 4302, IP Authentication encryption, message
Header authentication,
pseudorandom functions
(PRFs), and cryptographic
Architecture IPsec key exchange
• Covers the general concepts,
security requirements,
Documents Other
definitions, and mechanisms • There are a variety of
defining IPsec technology other IPsec-related RFCs,
• The current specification is including those dealing
RFC4301, Security Architecture with security policy and
for the Internet Protocol management information
base (MIB) content
IPsec Services
• IPsec provides security services at the IP layer by enabling a
system to:
• Select required security protocols
• Determine the algorithm(s) to use for the service(s)
• Put in place any cryptographic keys required to provide the
requested services

• RFC 4301 lists the following services:


• Access control
• Connectionless integrity
• Data origin authentication
• Rejection of replayed packets (a form of partial sequence
integrity)
• Confidentiality (encryption)
• Limited traffic flow confidentiality
Transport and Tunnel Modes
Transport Mode Tunnel Mode

• Provides protection primarily for • Provides protection to the entire IP


upper-layer protocols packet
• Examples include a TCP or UDP • Used when one or both ends of a
segment or an ICMP packet security association (SA) are a security
• Typically used for end-to-end gateway
communication between two • A number of hosts on networks behind
hosts firewalls may engage in secure
communications without
• ESP in transport mode encrypts implementing IPsec
and optionally authenticates the • ESP in tunnel mode encrypts and
IP payload but not the IP header optionally authenticates the entire
• AH in transport mode inner IP packet, including the inner IP
authenticates the IP payload and header
selected portions of the IP header • AH in tunnel mode authenticates the
entire inner IP packet and selected
portions of the outer IP header
Table 20.1
Tunnel Mode and Transport Mode Functionality
Encapsulating Security Payload (ESP)
• Used to encrypt the Payload Data, Padding, Pad Length, and Next
Header fields
• If the algorithm requires cryptographic synchronization data then these
data may be carried explicitly at the beginning of the Payload Data field
• An optional ICV field is present only if the integrity service is selected
and is provided by either a separate integrity algorithm or a combined
mode algorithm that uses an ICV
• ICV is computed after the encryption is performed
• This order of processing facilitates reducing the impact of DoS attacks
• Because the ICV is not protected by encryption, a keyed integrity
algorithm must be employed to compute the ICV
• The Padding field serves several purposes:
• If an encryption algorithm requires the plaintext to be a multiple of some
number of bytes, the Padding field is used to expand the plaintext to the
required length
• Used to assure alignment of Pad Length and Next Header fields
• Additional padding may be added to provide partial traffic-flow
confidentiality by concealing the actual length of the payload
Internet Key Exchange
• The key management portion of IPsec involves the
determination and distribution of secret keys
• A typical requirement is four keys for communication between
two applications
• Transmit and receive pairs for both integrity and confidentiality
• The IPsec Architecture document mandates support for two
types of key management:

• A system administrator
Automated
manually configures each
system with its own keys and • Enables the on-demand
with the keys of other creation of keys for SAs and
communicating systems facilitates the use of keys in a
• This is practical for small, large distributed system with
relatively static environments an evolving configuration

Manual
ISAKMP/Oakley
• The default automated key management protocol
of IPsec
• Consists of:
• Oakley Key Determination Protocol
• A key exchange protocol based on the Diffie-Hellman
algorithm but providing added security
• Generic in that it does not dictate specific formats
• Internet Security Association and Key Management
Protocol (ISAKMP)
• Provides a framework for Internet key management and
provides the specific protocol support, including formats, for
negotiation of security attributes
• Consists of a set of message types that enable the use of a
variety of key exchange algorithms
Features of IKE Key Determination
• Algorithm is characterized by five important
features:
• It employs a mechanism known as cookies to thwart clogging attacks
1.

• It enables the two parties to negotiate a group; this, in essence, specifies


2. the global parameters of the Diffie-Hellman key exchange

• It uses nonces to ensure against replay attacks


3.

• It enables the exchange of Diffie-Hellman public key values


4.

• It authenticates the Diffie-Hellman exchange to thwart man-in-the-middle-


5. attacks
Table 20.3
IKE Payload Types
Summary

• IP security overview • Encapsulating security


• Applications of IPsec
payload
• Benefits of IPsec • ESP format
• Routing applications • Encryption and
• IPsec documents authentication algorithms
• IPsec services • Padding anti-replay service
• Transport and tunnel • Transport and tunnel modes
modes • Internet key exchange
• IP security policy • Key determination protocol
• Security associations • Header and payload
formats
• Security association
database
• Security policy database
• IP traffic processing
WEB Security

56
Outline
• Web Security Considerations
• Secure Socket Layer (SSL) and Transport Layer
Security (TLS)
• Secure Electronic Transaction (SET)

57
Web Security Considerations
• The WEB is very visible.
• Complex software hide many security flaws.
• Web servers are easy to configure and
manage.
• Users are not aware of the risks.

58
Security facilities in the TCP/IP
protocol stack

59
SSL and TLS
• SSL was originated by Netscape
• TLS working group was formed within IETF
• First version of TLS can be viewed as an
SSLv3.1

60
SSL Architecture

61
SSL Record Protocol Operation

62
SSL Record Format

63
SSL Record Protocol Payload

64
Handshake Protocol
• The most complex part of SSL.
• Allows the server and client to authenticate
each other.
• Negotiate encryption, MAC algorithm and
cryptographic keys.
• Used before any application data are
transmitted.

65
Handshake Protocol Action

Henric Johnson 66
Transport Layer Security
• The same record format as the SSL record format.
• Defined in RFC 2246.
• Similar to SSLv3.
• Differences in the:
– version number
– message authentication code
– pseudorandom function
– alert codes
– cipher suites
– client certificate types
– certificate_verify and finished message
– cryptographic computations
– padding

67
Secure Electronic Transactions
• An open encryption and security specification.
• Protect credit card transaction on the Internet.
• Companies involved:
– MasterCard, Visa, IBM, Microsoft, Netscape, RSA,
Terisa and Verisign
• Not a payment system.
• Set of security protocols and formats.

68
SET Services
• Provides a secure communication channel in a
transaction.
• Provides tust by the use of X.509v3 digital
certificates.
• Ensures privacy.

69
SET Overview
• Key Features of SET:
– Confidentiality of information
– Integrity of data
– Cardholder account authentication
– Merchant authentication

70
SET Participants

Henric Johnson 71
Sequence of events for transactions
1. The customer opens an account.
2. The customer receives a certificate.
3. Merchants have their own certificates.
4. The customer places an order.
5. The merchant is verified.
6. The order and payment are sent.
7. The merchant request payment authorization.
8. The merchant confirm the order.
9. The merchant provides the goods or service.
10. The merchant requests payments.

72
Dual Signature
DS  EKRc [ H ( H ( PI ) || H(OI))]

73
Payment processing

Cardholder sends Purchase Request


74
Payment processing

Merchant Verifies Customer Purchase Request

75
Payment processing
• Payment Authorization:
– Authorization Request
– Authorization Response
• Payment Capture:
– Capture Request
– Capture Response

76

Вам также может понравиться