ch-16(cns)
TRANSCRIPT
-
7/31/2019 ch-16(CNS)
1/54
Security at theApplication Layer:
PGPandS/MIME
BKM/SIT
-
7/31/2019 ch-16(CNS)
2/54
E-mail Architecture
BKM/SIT
-
7/31/2019 ch-16(CNS)
3/54
E-mail Security
Cryptographic Algorithms
In e-mail security, the sender of the message needs
to include the name or identifiersof the algorithms used in the message.
Note
CertificatesIt is obvious that some public-key algorithms must be
used for e-mail security.
BKM/SIT
-
7/31/2019 ch-16(CNS)
4/54
Cryptographic 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 thereceiver and is sent with the message.
Note
BKM/SIT
-
7/31/2019 ch-16(CNS)
5/54
PGP
Pretty Good Privacy (PGP) can be used to create a
secure e-mail message or to store a file securely for
future retrieval.
Invented by Phil Zimmermann.
BKM/SIT
-
7/31/2019 ch-16(CNS)
6/54
Message Integrity
An authenticated message
BKM/SIT
-
7/31/2019 ch-16(CNS)
7/54
Confidentiality with One-Time Session Key
BKM/SIT
-
7/31/2019 ch-16(CNS)
8/54
Continued
Code Conversion Another service provided by PGP is code
conversion.
PGP uses Radix-64 conversion for non-ASCII data.
Segmentation
PGP allows segmentation to get uniform size unit of
the message after applying Radix-64 .
BKM/SIT
-
7/31/2019 ch-16(CNS)
9/54
Key Rings in PGP
Assuming that a person may send message to many
persons, PGP defines the concept of key rings.
BKM/SIT
-
7/31/2019 ch-16(CNS)
10/54
Key Rings in PGP-Contd
Note that Alice has several pair of public/private keys
belonging to other people. Alice sending a message
She uses her private key to sign the digest.
She uses the receivers public key to encrypt a
newly created session key.
She encrypts the message and signed digest with the
session key created.
Alice receiving a message She uses her private key to decrypt the session key.
She uses the session key to decrypt the message &
digest.
She uses her public key to verify the digest.BKM/SIT
-
7/31/2019 ch-16(CNS)
11/54
PGP Algorithms
BKM/SIT
-
7/31/2019 ch-16(CNS)
12/54
Continued
BKM/SIT
-
7/31/2019 ch-16(CNS)
13/54
Continued
BKM/SIT
-
7/31/2019 ch-16(CNS)
14/54
Continued
BKM/SIT
-
7/31/2019 ch-16(CNS)
15/54
PGP vs X.509 Certificates
PGP uses certificates to authenticate public keys. Unlike X.509, there is no need of CAs.
Anyone in the ring can sign a certificate for anyone
else in the ring.
Protocols that use X.509 certificates depend on thehierarchical structure of the trust.
That means a single path from the fully trusted
authority to any certificate.
But, in PGP there can be multiple paths from fullyor partially trusted authorities to any certificate.
BKM/SIT
-
7/31/2019 ch-16(CNS)
16/54
Private key ring table maintained by each entity
Used ID is usually the email-id of the user
Key ID is the first(LSB) 64 bits of the public key.
Public Key column lists the public key belonging to a
particular private key/public key pair. Encrypted private key column keeps the private
keys of the key ring in encrypted form.
Timestamp holds the date and time of the key pair
creation.BKM/SIT
-
7/31/2019 ch-16(CNS)
17/54
Public key ring table maintained by each entity
Used ID Here also the user-id is usually the e-mail id of the entity.
Key ID Here also the key id is first 64 bits of the public key.
Public Key This the public key of the entity. Producer Trust defines the trust level of the producer: full, partial
or none.
Certificate(s) It holds the certificates signed by other entities for this
entity.
Certificate Trust(s) It represents the certificate trust value of anentity, which is taken from Producer Trust value after receiving a
certificate from another entity.
Key Legitimacy This value is calculated by PGP based on the value
of the certificate trust and the weight for each certificate trust.BKM/SIT
-
7/31/2019 ch-16(CNS)
18/54
A series of steps will show how a public key ring table is
formed for Alice.
Example
BKM/SIT
-
7/31/2019 ch-16(CNS)
19/54
Continued
BKM/SIT
-
7/31/2019 ch-16(CNS)
20/54
Continued
BKM/SIT
d l
-
7/31/2019 ch-16(CNS)
21/54
Trust Model in PGP
Following shows a model of trust for Alice at
some point in time.
The diagram may change with changes in thepublic key ring
BKM/SIT
K R i
-
7/31/2019 ch-16(CNS)
22/54
Key Revocation
It may become necessary for an entity to
revoke(withdraw) his or her public key from thering.
This may happen if the owner of the key feels that
the key is compromised (stolen, for example) or just
too old to be safe.
BKM/SIT
E i I f i f Ri
-
7/31/2019 ch-16(CNS)
23/54
Extracting Information from RingsExtracting information at the Sender site
Assume that Alice is sending an Email to Bob.
For that, she needs 5 pieces of information from PGP asfollows:
The key id of the public key she wants to use
Her own private key
The session key Bob s public key ID
Bobs public key To get these, she has to input 4 pieces of information to
PGP as follows:
Her user ID
Her password
Key strokes
Bobs user IDBKM/SIT
E i I f i f Ri
-
7/31/2019 ch-16(CNS)
24/54
Extracting Information from RingsExtracting information at the Sender site
BKM/SIT
C i d
-
7/31/2019 ch-16(CNS)
25/54
ContinuedExtracting information at theReceiversite
BKM/SIT
PGP P k t
-
7/31/2019 ch-16(CNS)
26/54
PGP Packets
Format of packet header
BKM/SIT
PGP M
-
7/31/2019 ch-16(CNS)
27/54
PGP Messages
A PGP message is a combination of sequenced
and/or nested packets. Some examples are:
Encrypted Message
Signed Message Certificate Message
BKM/SIT
Lit l d t k t
-
7/31/2019 ch-16(CNS)
28/54
Literal data packet
It is the packet that carries the actual data to be
transmitted.
BKM/SIT
C d d t k t
-
7/31/2019 ch-16(CNS)
29/54
Compressed data packet
This packet carries compressed data.
The compression method used are ZIP(code:1) and
ZLIP(code:2)
BKM/SIT
E t d d t k t
-
7/31/2019 ch-16(CNS)
30/54
Encrypted data packet
This packet carries data from one/many packet that
have been encrypted using symmetric key algorithm.
But, a session packet carrying one time session key
must be sent before this.
BKM/SIT
Si t k t
-
7/31/2019 ch-16(CNS)
31/54
Signature packet
It protects the integrity of the data.
BKM/SIT
Continued
-
7/31/2019 ch-16(CNS)
32/54
Continued
BKM/SIT
Session key packet
-
7/31/2019 ch-16(CNS)
33/54
Session-key packet
This packet is used to send the session key encrypted
with the receivers public key
BKM/SIT
Public key packet
-
7/31/2019 ch-16(CNS)
34/54
Public-key packet
This packet contains the public key of the sender.
BKM/SIT
User ID packet
-
7/31/2019 ch-16(CNS)
35/54
User ID packet
This packet identifies a user and associate the used
ID contents with a public key of the sender.
BKM/SIT
PGP Message Formats
-
7/31/2019 ch-16(CNS)
36/54
PGP Message Formats
Encrypted message
BKM/SIT
Signed message
-
7/31/2019 ch-16(CNS)
37/54
Signed message
BKM/SIT
Certificate message
-
7/31/2019 ch-16(CNS)
38/54
Certificate message
BKM/SIT
-
7/31/2019 ch-16(CNS)
39/54
S/MIME
Secure/Multipurpose Internet Mail Extension
(S/MIME).
This is an enhancement of the supplementary protocol
called MIME which has been integrated to the email
system. MIME helps to transmit non-ASCII data(which were
not allowed earlier) to be sent over the same email.
MIME transforms non-ASCII data at the sender site to
NVT ASCII data and delivers it to the client MTA to besent through the Internet.
At the receiving site, it is again transformed back to
original data.BKM/SIT
MIME
-
7/31/2019 ch-16(CNS)
40/54
MIME
BKM/SIT
Continued
-
7/31/2019 ch-16(CNS)
41/54
Continued
BKM/SIT
Continued
-
7/31/2019 ch-16(CNS)
42/54
Continued
Text
BKM/SIT
Continued
-
7/31/2019 ch-16(CNS)
43/54
Continued
BKM/SIT
Radix-64 conversion
-
7/31/2019 ch-16(CNS)
44/54
Radix-64 conversion
This is a solution for sending data bytes when the
highest bit is not necessarily zero.
It divides the binary data into 24-bit blocks.
Each block is then divided into four sections, 6bits each.
BKM/SIT
Continued
-
7/31/2019 ch-16(CNS)
45/54
Continued
BKM/SIT
Quoted-printable
-
7/31/2019 ch-16(CNS)
46/54
Quoted printable
This encoding can be suitable if the data consists of
mostly of ASCII characters with a small non-ASCII
portions. If a character is ASCII, it is sent as it is, but if it is
non-ASCII, it is sent as three characters.
First character is a =sign , then next two are the
hexadecimal representations of the byte.
BKM/SIT
S/MIME
-
7/31/2019 ch-16(CNS)
47/54
S/MIME
S/MIME adds some new content types to include
security services to the MIME. All of these new types include the parameter
application/pkcs7-mime, in which pkcs defines
Public Key Cryptography Specification.
Cryptographic Message Syntax (CMS)
To define how security services, such as
confidentiality or integrity, can be added to MIME
content types, S/MIME has defined Cryptographic
Message Syntax (CMS).
The syntax in each case defines the exact encoding
scheme for each content type.BKM/SIT
Example
-
7/31/2019 ch-16(CNS)
48/54
The following shows an example of an enveloped-datain which a small message is encrypted using triple DES.
Example
BKM/SIT
Signed-data content type
-
7/31/2019 ch-16(CNS)
49/54
Signed data content type
This type provides only integrity of data.
It contains any type and zero or more signature values.
BKM/SIT
Enveloped-data content type
-
7/31/2019 ch-16(CNS)
50/54
Enveloped data content type This type is used to provide privacy for the message.
It contains any type and zero or more encrypted keys and
certificates.
BKM/SIT
Digest-data content type
-
7/31/2019 ch-16(CNS)
51/54
Digest data content type
This type is also used to provide integrity for the
message
BKM/SIT
Authenticated-data content type
-
7/31/2019 ch-16(CNS)
52/54
Authenticated data content type
This type is used to provide authentication of the data
BKM/SIT
Key Management
-
7/31/2019 ch-16(CNS)
53/54
Key Management
The key management in S/MIME is a combination
of key management used by X.509 and PGP.
BKM/SIT
Cryptographic Algorithms
-
7/31/2019 ch-16(CNS)
54/54
C yp g p g
S/MIME defines several cryptographic algorithms.
The term must means an absolute requirement; theterm should means recommendation.