Module V_Email Security
Module V_Email Security
Dimple Bohra
Contents
● E-mail Architecture, Email Security
● PGP, Key Rings, PGP Algorithms
● PGP Certificate
ELECTRONIC MAIL (E-Mail)
One of the most popular Internet services is
electronic mail (e-mail). The designers of the
Internet probably never imagined the popularity of
this application program. Its architecture consists
of several components.
Three main components are : User Agent (UA),
Message Transfer Agent (MTA) and Message
Access Agent (MAA).
Electronic mail (Contd..)
To explain the architecture of e-mail, consider
four scenarios:
1. When sender and receiver on the same system.
2. When sender and receiver on different system.
3. When sender is connected to mail server via LAN
or WAN.
4. When sender and receiver both are connected to
their mail server via LAN or WAN.
First scenario in electronic mail
Note
When the sender and the receiver of an
e-mail are on the same system,
we need only two user agents.
Second scenario in electronic mail
Note
When the sender and the receiver of an
e-mail are on different systems, we
need two UAs and a pair of
MTAs (client and server).
Third scenario in electronic mail
Note
When the sender is connected to the
mail server via a LAN or a WAN,
we need two UAs and two pairs
of MTAs (client and server).
Fourth scenario in electronic mail
E-mail Architecture
■ The administrator of the
e-mail server at Alice’s site
has created a queuing
system that sends e-mail to
the Internet one by one.
■ The administrator of e-mail
server at Bob’s site has
created a mailbox for every
user connected to the server.
User Agent (UA)
■ The first component of an electronic mail system is the
user agent (UA) program used to prepare message.
■ User agents are of two types: command driven and GUI
based.
■ Services Provided by a User Agent:
A user agent composes, reads, replies to, and forwards
messages.
It also handles mailboxes.
Services of user agent
Message Transfer Agent (MTA)
■ The actual mail transfer is done through message
transfer agents. MTA is used to send message to mail
server.
■ To send mail, a system must have the client MTA, and
to receive mail, a system must have a server MTA.
■ The formal protocol that defines the MTA client and
server in the Internet is called the Simple Mail Transfer
Protocol (SMTP).
SMTP range
Message Access Agent (MAA)
■ The reading of the received message is done
through MAA. It is designed to pull messages
from the server.
■ MAA is also client server program.
■ The formal protocols that defines MAA client
and server are : Post Office Protocol, version 3
(POP3) and Internet Mail Access Protocol,
version 4 (IMAP4).
Format of an e-mail
E-mail Architecture
■ When Alice needs to send a message to Bob, Alice invokes a user agent (UA)
program to prepare the message.
■ Alice then uses another program, a message transfer agent (MTA), to send the
message to the mail server at her site. Note that the MTA is a client/server
program with the client installed at Alice's computer and the server installed at
the mail server.
■ The message received at the mail server at Alice's site is queued with all other
messages; each goes to its corresponding destination.
■ In Alice's case, her message goes to the mail server at Bob's site.
■ A client/server MTA is responsible for the e-mail transfer between the two
servers.
■ When the message arrives at the destination mail server, it is stored in Bob's
mailbox, a special file that holds the message until it is retrieved by Bob.
■ When Bob needs to retrieve his messages, he invokes another program, which
we call a message access agent (MAA)
E-mail Architecture
■ The sending of an e-mail from Alice to Bob is a store-retrieve
activity.
■ The main communication between Alice and Bob is through
two application programs: the MTA client at Alice's computer
and the MAA client at Bob's computer.
■ The MTA client program is a push program. The MAA client
program is a pull program.
■ Alice and Bob cannot directly communicate using an MTA
client at the sender site and an MTA server at the receiver
site.
Protocols used in E-mail
Protocols used in E-mail
■ SMTP uses commands and responses to transfer messages between an
MTA client and an MTA server.
■ POP3 Post Office Protocol, version 3 (POP3) is simple but limited in
functionality. The client POP3 software is installed on the recipient
computer; the server POP3 software is installed on the mail server.
■ POP3 has two modes: the delete mode and the keep mode. In the delete
mode, the mail is deleted from the mailbox after each retrieval. In the keep
mode, the mail remains in the mailbox after retrieval
■ IMAP4 protocol is Internet Mail Access Protocol, version 4 (IMAP4). IMAP4
is similar to POP3, but it has more features; IMAP4 is more powerful and
more complex.
E-mail Security
● Sending an e-mail is a one-time activity.
● Normally message contents are not secured. Messages Can be
read/modified either in transit or at destination by the attacker. It is like
postcard service, just pick it and read it.
● We need to discuss the security of a unidirectional message because what
Alice sends to Bob is totally independent from what Bob sends to Alice.
● If e-mail is a one-time activity, how can the sender and receiver agree on
a cryptographic algorithm to use for e-mail security? If there is no session
and no handshaking to negotiate the algorithms for encryption/decryption
and hashing, how can the receiver know which algorithm the sender has
chosen for each purpose?
E-mail Security : Cryptographic Algorithms
● One solution is for the underlying protocol to select one algorithm for
each cryptographic operation and to force Alice to use only those
algorithms. This solution is very restrictive and limits the capabilities of
the two parties.
● A better solution is for the underlying protocol to define a set of
algorithms for each operation that the user used in his/her system.
Alice includes the name (or identifiers) of the algorithms she has used
in the e-mail.
● The simplest scenario is to send the e-mail message (or store the file)
in plaintext
●
PRETTY GOOD PRIVACY (PGP)
Compression
● A further improvement is to compress the message and digest to make
the packet more compact.
● This improvement has no security benefit, but it eases the traffic.
PRETTY GOOD PRIVACY (PGP)
Confidentiality with One-Time Session key
● As we discussed before, confidentiality in an e-mail system can be achieved
using conventional encryption with a one-time session key.
● Alice can create a session key, use the session key to encrypt the message and
the digest, and send the key itself with the message.
● However, to protect the session key, Alice encrypts it with Bob's public key.
PRETTY GOOD PRIVACY (PGP)
Confidentiality with One-Time Session key
● When Bob receives the packet, he first decrypts the key, using his private key
to remove the key.
● He then uses the session key to decrypt the rest of the message. After
decompressing the rest of the message, Bob creates a digest of the message
and checks to see if it is equal to the digest sent by Alice. If it is, then the
message is authentic.
PRETTY GOOD PRIVACY (PGP)
Code Conversion
Segmentation
3. Janette issues two certificates, one for John (with public key K3) and one for Lee (with public key
K4). Alice stores John's certificate under his name and Lee's certificate under his name, each with a
partial level of trust. Note that John now has two certificates, one from Anne and one from Janette,
each with a partial level of trust.
4. John issues a certificate for Liz. Alice can discard or keep this certificate with a signature trust of
none.
PGP Certificates : Trusts and Legitimacy
Key Legitimacy
● The purpose of using introducer and certificate trusts is to
determine the legitimacy of a public key.
● Alice needs to know how legitimate the public keys of Bob,
John, Liz, Anne, and so on are.
● PGP defines a very clear procedure for determining key
legitimacy.
PGP Certificates : Trusts and Legitimacy
Key Legitimacy
● The level of the key legitimacy for a user is the weighted trust levels of that user. For
example, suppose we assign the following weights to certificate trust levels:
1. A weight of 0 to a non trusted certificate
2. A weight of 1/2 to a certificate with partial trust
3. A weight of 1 to a certificate with full trust
● Then to fully trust an entity, Alice needs one fully trusted certificate or two partially
trusted certificates for that entity.
● For example, Alice can use John's public key in the previous scenario because both Anne
and Janette have issued a certificate for John, each with a certificate trust level of 1/2.
● Note that the legitimacy of a public key belonging to an entity does not have anything to
do with the trust level of that person.
● Although Bob can use John's public key to send a message to him, Alice cannot accept
any certificate issued by John because, for Alice, John has a trust level of none.
PGP Certificates : Starting the Ring
In PGP, the key legitimacy of a trusted or partially trusted entity can be also determined by other methods.
● Alice can physically obtain Bob's public key. For example, Alice and Bob can meet personally and exchange
a public key written on a piece of paper or to a disk.
● If Bob's voice is recognizable to Alice, Alice can call him and obtain his public key on the phone.
● A better solution proposed by PGP is for Bob to send his public key to Alice by e-mail. Both Alice and Bob
make a 16-byte MD5 (or 20-byte SHA-1) digest from the key. The digest is normally displayed as eight
groups of 4 digits (or ten groups of 4 digits) in hexadecimal and is called a fingerprint. Alice can then call
Bob and verify the fingerprint on the phone. If the key is altered or changed during the e-mail
transmission, the two fingerprints do not match. To make it even more convenient, PGP has created a list
of words, each representing a-4-digit combination. When Alice calls Bob, Bob can pronounce the eight
words (or ten words) for Alice. The words are carefully chosen by PGP to avoid those similar in
pronunciation; for example, if sword is in the list, word is not.
● In PGP, nothing prevents Alice from getting Bob's public key from a CA in a separate procedure. She can
then insert the public key in the public key ring.
PGP Certificates : Key Ring Tables
● Each user, such as Alice, keeps track of two key rings: one private-key ring and
one public key ring.
● PGP defines a structure for each of these key rings in the form of a table.
User ID: The user ID is usually the e-mail address of the user. However, the user may designate a unique
e-mail address or alias for each key pair. The table lists the user ID associated with each pair.
Key ID: This column uniquely defines a public key among the user's public keys.
In PGP, the key ID for each pair is the first (least significant) 64 bits of the public key. In other words, the
key ID is calculated as (key mod 264). The key ID is needed for the operation of PGP because Bob may
have several public keys belonging to Alice in his public key ring. When he receives a message from
Alice, Bob must know which key ID to use to verify the message. The key ID, which is sent with the
message, enables Bob to use a specific public key for Alice from his public ring. The entire public key is
not sent because in public-key cryptography, the size of the public key may be very long. Sending just 8
bytes reduces the size of the message.
PGP Certificates : Key Ring Tables
Private Key Ring Table
Public Key: This column just lists the public key belonging to a particular private key/public key
pair.
Encrypted Private Key: This column shows the encrypted value of the private key in the private
key/public key pair. Although Alice is the only person accessing her private ring, PGP saves only
the encrypted version of the private key. We will see later how the private key is encrypted and
decrypted.
Timestamp : This column holds the date and time of the key pair creation. It helps the user
decide when to purge old pairs and when to create new ones.
PGP Certificates : Key Ring Tables
Public Key Ring Table
User ID: As in the private key ring table, the user ID is usually the e-mail address of the user.
Key ID: As in the private key ring table, the key ID for each pair is the first (least significant) 64 bits of the
public key
Certificate Trust(s): This column represents the certificate trust or trusts. If Anne sends a certificate for
John, PGP searches the row entry for Anne, finds the value of the producer trust for Anne, copies that
value, and inserts it in the certificate trust field in the entry for John.
Key Legitimacy: This value is calculated by PGP based on the value of the certificate trust and the
predefined weight for each certificate trust.
Timestamp: This column holds the date and time of the column creation.
Key Ring Table Illustration with Example
Thank You!!!!