VTU Network and Cyber Security Module-2 (15ec835, 17ec835) .
VTU Network and Cyber Security Module-2 (15ec835, 17ec835) .
VTU Network and Cyber Security Module-2 (15ec835, 17ec835) .
(15EC835, 17EC835)
MODULE-2
MODULE-2
E-mail Security: Pretty Good Privacy, S/MIME, and Domain keys identified
mail.
TEXT BOOK:
REFERENCE BOOKS:
PGP has grown explosively and is now widely used. A number of reasons can be
cited for this growth
1. It is available free worldwide in versions that run on a variety of platforms, including
Windows, UNIX, Macintosh, and many more. In addition, the commercial version
satisfies users who want a product that comes with vendor support.
2. It is based on algorithms that have survived extensive public review and are
considered extremely secure. Specifically, the package includes RSA, DSS, and Diffie-
Hellman for public-key encryption; CAST-128, IDEA, and 3DES for symmetric
encryption; and SHA-1 for hash coding.
3. It has a wide range of applicability, from corporations that wish to select and enforce
a standardized scheme for encrypting files and messages to individuals who wish to
communicate securely with others worldwide over the Internet and other networks.
4. It was not developed by, nor is it controlled by, any governmental or standards
organization. For those with an instinctive distrust of “the establishment,” this
makes PGP attractive.
5. PGP is now on an Internet standards track (RFC 3156; MIME Security with Open
PGP). Nevertheless, PGP still has an aura of an antiestablishment endeavour.
1.1 NOTATION
Most of the notation used in this chapter has been used before, but a few terms
are new. It is perhaps best to summarize those at the beginning. The following symbols
are used.
The actual operation of PGP, as opposed to the management of keys, consists of four
services: authentication, confidentiality, compression, and e-mail compatibility (Table
1).
Receiver:
4. The receiver uses RSA with the sender’s public key to decrypt and recover the
hash code.
5. 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.
2. The message is encrypted using CAST-128 (or IDEA or 3DES) with the session
key.
3. The session key is encrypted with RSA using the recipient’s public key and is
prepended to the message.
Receiver:
4. The receiver uses RSA with its private key to decrypt and recover the session
key.
5. The session key is used to decrypt the message.
1.1.4 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, indicated by Z for compression
and 𝑍−1 for decompression in figure (1, 2 &3) critical. The compression algorithm used is
ZIP.
When PGP is used, at least part of the block to be transmitted is encrypted, and
thus consists of a stream of arbitrary 8-bit octets.
However many electronic mail systems only permit the use 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.
It uses radix-64 conversion, in which each group of three octets of binary data is
mapped into four ASCII characters. This format also appends a CRC to detect
transmission errors. The use of radix 64 expands a message by 33%, but still an
overall compression of about one- third can be achieved.
Transmissions
Reception
4. On reception, the incoming block is first converted back from radix-64 format to
binary.
5. If the message is encrypted, the recipient recovers the session key and decrypts
the message. The resulting block is then decompressed.
6. If the message is signed, the recipient recovers the transmitted hash code and
compares it to its own calculation of the hash code.
The concept of key ID has been introduced; we can take a more detailed look at the
format of a transmitted message, which is shown in Figure 5
A message consists of three components: the message component, a signature
(Optional), and a session key component (optional).
The message component includes the actual data to be stored or transmitted, as
well as a filename and a timestamp that specifies the time of creation.
The signature component includes the following:
Timestamp: The time at which the signature was made.
Message digest: The 160-bit SHA-1 digest, encrypted with the sender's
private signature key.
Leading two octets of message digest: To enable the recipient to determine
if the correct public key was used to decrypt the message digest for
authentication, by comparing this plaintext copy of the first two octets with
the first two octets of the decrypted digest. These octets also serve as a 16-bit
frame check sequence for the message.
Key ID of sender's public key: Identifies the public key that should be used
to decrypt the message digest and, hence, identifies the private key that was
used to encrypt the message digest.
Dept. of ECE, BGSIT, BG Nagara, Mandya. Page 8
NETWORK AND CYBER SECURITY 15EC835, 17EC835
The following figure 6 shows the steps during message transmission assuming
that the Message is to be both signed and encrypted.
The sending PGP entity performs the following steps
c. PGP then recovers the session key and decrypts the message.
Both PGP and S/MIME make use of an encoding technique referred to as radix-64
Conversion. This technique maps arbitrary binary input into printable character output.
The form of encoding has the following relevant characteristics:
1. The range of the function is a character set that is universally represent able At
all sites, not a specific binary encoding of that character set. Thus, the characters
themselves can be encoded into whatever form is needed by a specific system.
Table 2 shows the mapping of 6-bit input values to characters. The character set
consists of the alphanumeric characters plus “+” and “/”. The “=” character is used as
the padding character.
For example, consider the 24-bit raw text sequence 00100011 01011100 10010001,
which can be expressed in hexadecimal as 235C91. We arrange this input in blocks of 6
bits: 001000 110101 110010 010001
The extracted 6-bit decimal values are 8, 53, 50, and 17. Looking these up in Table 2
yields the radix-64 encoding as the following characters: I1yR. If these characters are
stored in 8-bit ASCII format with parity bit set to zero, we have 01001001 00110001
01111001 01010010
In hexadecimal, this is 49317952. To summarize:
use, while PGP will remain the choice for personal e-mail security for many
users.
S/MIME is defined in a number of documents—most importantly RFCs 3370,
3850, 3851, and 3852.
RFC 5322 defines a format for text messages that are sent using electronic mail.
It has been the standard for Internet-based text mail messages and remains in
common use.
In the RFC 5322 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.
The RFC 5322 standard applies only to the contents.
The content standard includes a set of header fields that may be used by the mail
system to create the envelope, and the standard is intended to facilitate the
acquisition of such information by programs.
The overall structure of a message that conforms to RFC 5322 is very simple.
A message consists of some number of header lines (the header) followed by
unrestricted text (the body).
The header is separated from the body by a blank line. Put differently, a message
is ASCII text, and all lines up to the first blank line are assumed to be header lines
used by the user agent part of the mail system.
IMP QS (question)-10M
1. MIME-Version: Must have the parameter value 1.0. This field indicates that the
message conforms to RFCs 2045 and 2046.
2. 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.
3. 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.
4. Content-ID: Used to identify MIME entities uniquely in multiple contexts.
5. Content-Description: A text description of the object with the body; this is
useful when the object is not readable (e.g., audio data).
The bulk of the MIME specification is concerned with the definition of a variety of
content types.
Table 3 lists the content types specified in RFC 2046. There are seven different
major types of content and a total of 15 subtypes.
In general, a content type declares the general type of data, and the subtype
specifies a particular format for that type of data.
For the text type
The text type of body, the primary subtype is plain text, which is simply a
string of ASCII characters or ISO 8859 characters. The enriched subtype
allows greater formatting flexibility.
For multipart type
Multipart type indicates that the body contains multiple, independent parts.
The Content-Type header field includes a parameter (called a boundary) that
defines the delimiter between body parts.
This boundary should not appear in any parts of the message.
Each boundary starts on a new line and consists of two hyphens followed by
the boundary value.
The final boundary, which indicates the end of the last part, also has a suffix
of two hyphens. Within each part, there may be an optional ordinary MIME
header.
There are four subtypes of the multipart type, all of which have the same
overall syntax.
In terms of general functionality, S/MIME is very similar to PGP. Both offer the
ability to sign and/or encrypt messages.
1. Enveloped data: This consists of encrypted content of any type and encrypted
content encryption keys for one or more recipients.
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.
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.
message SHOULD use the same encryption algorithm as was used on the last
signed and encrypted message received from that intended recipient.
3. If the sending agent has no knowledge about the decryption capabilities of the
intended recipient and is willing to risk that the recipient may not be able to
decrypt the message, then the sending agent SHOULD use triple DES.
4. If the sending agent has no knowledge about the decryption capabilities of the
intended recipient and is not willing to risk that the recipient may not be able to
decrypt the message, then the sending agent MUST use RC2/40.
If a message is to be sent to multiple recipients and a common encryption algorithm
cannot be selected for all, then the sending agent will need to send two messages. However,
in that case, it is important to note that the security of the message is made vulnerable by the
transmission of one copy with lower security.
S/MIME makes use of a number of new MIME content types, which are shown in
Table 7. All of the new application types use the designation PKCS. This refers to a set of
public-key cryptography specifications issued by RSA Laboratories and made available
for the S/MIME effort.
The signed Data smime-type can be used with one or more signers. For clarity,
we confine our description to the case of a single digital signature. The steps for
preparing a signed Data MIME entity are as follows
1. Select a message digest algorithm (SHA or MD5).
2. Compute the message digest (hash function) of the content to be signed.
3. Encrypt the message digest with the signer’s private key.
4. Prepare a block known as Signer Info that contains the signer’s public-key
certificate, an identifier of the message digest algorithm, an identifier of the
algorithm used to encrypt the message digest, and the encrypted message digest.
The signed Data entity consists of a series of blocks, including a message digest
algorithm identifier, the message being signed, and Signer Info.
The signed Data entity consists of a series of blocks, including a message digest
algorithm identifier, the message being signed, and Signer Info.
2.11CLEAR SIGNING
Clear signing is achieved using the multipart content type with a signed subtype.
As was mentioned, this signing process does not involve transforming the
message to be signed, so that the message is sent “in the clear.”
Thus, recipients with MIME capability but not S/MIME capability are able to
read the incoming message.
A multipart/signed message has two parts.
The first part can be any MIME type but must be prepared so that it will not
be altered during transfer from source to destination.
The Second part has a MIME content type of application and a subtype of
pkcs7-signature.
There are several companies that provide certification authority (CA) services.
VeriSign provides a CA service that is intended to be compatible with S/MIME
and a variety of other applications.
VeriSign issues X.509 certificates with the product name VeriSign Digital ID.
The information contained in a Digital ID depends on the type of Digital ID and
its use. At a minimum, each Digital ID contains
1. Owner’s public key
2. Owner’s name or alias
3. Expiration date of the Digital ID
4. Serial number of the Digital ID
5. Name of the certification authority that issued the Digital ID
6. Digital signature of the certification authority that issued the Digital ID
Digital IDs can also contain other user-supplied information, including
1. Address
2. E-mail address
3. For Class 3 Digital IDs, VeriSign requires a higher level of identity assurance. An
individual must prove his or her identity by providing notarized credentials or
applying in person.
Message recipients (or agents acting in their behalf) can verify the signature by
querying the signer’s domain directly to retrieve the appropriate public key and
thereby can confirm that the message was attested to by a party in possession of
the private key for the signing domain.
DKIM is a proposed Internet Standard (RFC 4871: Domain Keys Identified Mail
(DKIM) Signatures). DKIM has been widely adopted by a range of e-mail
providers, including corporations, government agencies, Gmail, yahoo, and many
Internet Service Providers (ISPs).
At its most fundamental level, the Internet mail architecture consists of a user
world in the form of Message User Agents (MUA), and the transfer world, in the form of
the Message Handling Service (MHS), which is composed of Message Transfer Agents
(MTA).
Figure 9 illustrates the key components of the Internet mail architecture, which
include the following.
1. Message User Agent (MUA): Operates on behalf of user actors and user
applications. It is their representative within the e-mail service. Typically, this
function is housed in the user’s computer and is referred to as a client e-mail
program or a local network e-mail server. The author MUA formats a message
and performs initial submission into the MHS via a MSA. The recipient MUA
processes received mail for storage and/or display to the recipient user.
2. Mail Submission Agent (MSA): Accepts the message submitted by an MUA and
enforces the policies of the hosting domain and the requirements of Internet
standards. This function may be located together with the MUA or as a separate
functional model. In the latter case, the Simple Mail Transfer Protocol (SMTP) is
used between the MUA and the MSA.
3. Message Transfer Agent (MTA): Relays mail for one application-level hop. It is
like a packet switch or IP router in that its job is to make routing assessments
and to move the message closer to the recipients. Relaying is performed by a
sequence of MTAs until the message reaches a destination MDA. An MTA also
adds trace information to the message header. SMTP is used between MTAs and
between an MTA and an MSA or MDA.
Figure 9: Function Modules and Standardized Protocols Used Between Them or Internet
mail architecture
4. Mail Delivery Agent (MDA): Responsible for transferring the message from the
MHS to the MS.
5. Message Store (MS): An MUA can employ a long-term MS. An MS can be located
on a remote server or on the same machine as the MUA. Typically, an MUA
retrieves messages from a remote server using POP (Post Office Protocol) or
IMAP (Internet Message Access Protocol).
Two other concepts need to be defined
1. An administrative management domain (ADMD) is an Internet e-mail
provider.
2. The Domain Name System (DNS) is a directory lookup service that provides a
mapping between the name of a host on the Internet and its numerical address.
3.2.1 Characteristics
RFC 4686 characterizes the range of attackers on a spectrum of three levels of threat.
1. At the low end are attackers who simply want to send e-mail that a recipient
does not want to receive. The attacker can use one of a number of commercially
available tools that allow the sender to falsify the origin address of messages.
This makes it difficult for the receiver to filter spam on the basis of originating
address or domain.
2. At the next level are professional senders of bulk spam mail. These attackers
often operate as commercial enterprises and send messages on behalf of third
parties. They employ more comprehensive tools for attack, including Mail
Transfer Agents (MTAs) and registered domains and networks of compromised
computers (zombies) to send messages and (in some cases) to harvest addresses
to which to send.
3. The most sophisticated and financially motivated senders of messages are those
who stand to receive substantial financial benefit, such as from an e- mail-based
fraud scheme. These attackers can be expected to employ all of the above
mechanisms and additionally may attack the Internet infrastructure itself,
including DNS cache-poisoning attacks and IP routing attacks.
3.2.2 Capabilities
RFC 4686 lists the following as capabilities that an attacker might have.
5. Resend messages that may have been previously signed by the domain.
6. Transmit messages using any envelope information desired.
7. Act as an authorized submitter for messages from a compromised computer.
8. Manipulation of IP routing. This could be used to submit messages from specific
IP addresses or difficult-to-trace addresses, or to cause diversion of messages to
a specific domain.
9. Limited influence over portions of DNS using mechanisms such as cache
poisoning. This might be used to influence message routing or to falsify
advertisements of DNS-based keys or signing practices.
10. Access to significant computing resources, for example, through the conscription
of worm-infected “zombie” computers. This could allow the “bad actor” to
perform various types of brute-force attacks.
11. Ability to eavesdrop on existing traffic, perhaps from a wireless network.
3.2.3 Location
Signing is performed by an authorized module within the signing ADMD and uses
private information from a Key Store. Within the originating ADMD, this might be
performed by the MUA, MSA, or an MTA.