SlideShare a Scribd company logo
E-mail Security:
PGP and S/MIME
2
Outline
 PGP
– services
– message format
– key management
– trust management
 S/MIME
– services
– message formats
– key management
3
What is PGP?
 PGP - Pretty Good Privacy
 general purpose application to protect (encrypt and/or sign)
files
 can be used to protect e-mail messages
 can be used by corporations as well as individuals
 based on strong cryptographic algorithms (IDEA, RSA, SHA-1)
 available free of charge at http://www.pgpi.org
 first version developed by Phil Zimmermann
 PGP is now on an Internet standards track (RFC 3156)
4
PGP services
 messages
– authentication
– confidentiality
– compression
– e-mail compatibility
– segmentation and reassembly
 key management
– generation, distribution, and revocation of public/private keys
– generation and transport of session keys and IVs
PGP/services
5
Message authentication
 based on digital signatures
 supported algorithms: RSA/SHA and DSS/SHA
hashhash encenc
hashhash decdeccomparecompare
accept / reject
m h σ
Ksnd
-1
Ksnd
m h σh
senderreceiver
PGP/services
6
Message confidentiality
 symmetric key encryption in CFB mode with a random session
key and IV
 session key and IV is encrypted with the public key of the
receiver
 supported algorithms:
– symmetric: CAST, IDEA, 3DES
– asymmetric: RSA, ElGamal
prngprng
s.encs.enc
m
Krcv
sender
a.enca.enc
k, iv
{m}k
{k, iv}Krcv
PGP/services
7
Compression
 applied after the signature
– enough to store clear message and signature for later verification
– it would be possible to dynamically compress messages before
signature verification, but …
– then all PGP implementations should use the same compression
algorithm
– however, different PGP versions use slightly different compression
algorithms
 applied before encryption
– compression reduces redundancy → makes cryptanalysis harder
 supported algorithm: ZIP
PGP/services
8
E-mail compatibility
 encrypted messages and signatures may contain arbitrary
octets
 most e-mail systems support only ASCII characters
 PGP converts an arbitrary binary stream into a stream of
printable ASCII characters
 radix 64 conversion: 3 8-bit blocks → 4 6-bit blocks
0 7 0 7 0 7
0 5 0 5 0 5 0 5
character
encoding
6-bit
value
52 0
… …
61 9
62 +
63 /
(pad) =
0 A
… ...
25 Z
26 a
… …
51 z
character
encoding
6-bit
value
PGP/services
9
Combining services
X := fileX := file
signature?signature?
compress
X := Z(X)
compress
X := Z(X)
encryption?encryption?
radix 64
X := R64(X)
radix 64
X := R64(X)
generate signature
X := σ(X) || X
generate signature
X := σ(X) || X
generate envelop
X := {k}Krcv || {X}k
generate envelop
X := {k}Krcv || {X}k
yes
yes
no
no
PGP/services
10
PGP message format
session key
component
signature
message
key ID of Krcv
session key k
timestamp
key ID of Ksnd
leading two octets of hash
hash
filename
timestamp
data
{}Krcv{}Ksnd
-1
{}k
ZIP
R64
PGP/messageformat
11
Key IDs
 a user may have several public key – private key pairs
– which private key to use to decrypt the session key?
– which public key to use to verify a signature?
 transmitting the whole public key would be wasteful
 associating a random ID to a public key would result in
management burden
 PGP key ID: least significant 64 bits of the public key
– unique within a user with very high probability
PGP/keyandtrustmanagement
12
Random number generation
 true random numbers
– used to generate public key – private key pairs
– provide the initial seed for the pseudo-random number generator
(PRNG)
– provide additional input during pseudo-random number generation
 pseudo-random numbers
– used to generate session keys and IVs
PGP/keyandtrustmanagement
13
True random numbers
 PGP maintains a 256-byte buffer of random bits
 each time PGP expects a keystroke from the user, it records
– the time when it starts waiting (32 bits)
– the time when the key was pressed (32 bits)
– the value of the key stroke (8 bits)
 the recorded information is used to generate a key
 the generated key is used to encrypt the current value of the
random-bit buffer
PGP/keyandtrustmanagement
14
Pseudo-random numbers
 based on the ANSI X9.17 PRNG standard
3DES3DES
3DES3DES
3DES3DES
+
+
DTi
Vi
Vi+1
K1, K2
Ri
PGP/keyandtrustmanagement
15
Pseudo-random numbers
EE
EE
EE+
+
EE
EE+
+
EE
EE+
+
+ + +
dtbuf
rseed
rseed’
IV[0..7] K[8..15] K[0..7]
true
random
bits
 CAST-128 is used instead of 3DES with key rkey
PGP/keyandtrustmanagement
16
Pseudo-random numbers
 dtbuf[0..3] = current time, dtbuf[4..7] = 0
 pre-wash
– take the hash of the message
• this has already been generated if the message is being signed
• otherwise the first 4K of the message is hashed
– use the result as a key, use a null IV, and encrypt (rkey, rseed)previous in
CFB mode
• if (rkey, rseed)previous is empty, it is filled up with true random bits
– set (rkey, rseed)current to the result of the encryption
 post-wash
– generate 24 more bytes as before but without XORing in true random
bytes
– encrypt the result in CFB mode using K and IV
– set (rkey, rseed)previous to the result of the encryption
PGP/keyandtrustmanagement
17
Private-key ring
 used to store the public key – private key pairs owned by a
given user
 essentially a table, where each row contains the following
entries:
– timestamp
– key ID (indexed)
– public key
– encrypted private key
– user ID (indexed)
encencpassphrase
hashhash
private key
encrypted private key
PGP/keyandtrustmanagement
18
Public-key ring
 used to store public keys of other users
 a table, where each row contains the following entries:
– timestamp
– key ID (indexed)
– public key
– user ID (indexed)
– owner trust
– signature(s)
– signature trust(s)
– key legitimacy
PGP/keyandtrustmanagement
19
Trust management
 owner trust
– assigned by the user
– possible values:
• unknown user
• usually not trusted to sign
• usually trusted to sign
• always trusted to sign
• ultimately trusted (own key, present in private key ring)
 signature trust
– assigned by the PGP system
– if the corresponding public key is already in the public-key ring, then its
owner trust entry is copied into signature trust
– otherwise, signature trust is set to unknown user
PGP/keyandtrustmanagement
20
Trust management
 key legitimacy
– computed by the PGP system
– if at least one signature trust is ultimate, then the key legitimacy is 1
(complete)
– otherwise, a weighted sum of the signature trust values is computed
• always trusted signatures has a weight of 1/X
• usually trusted signatures has a weight of 1/Y
• X, Y are user-configurable parameters
– example: X=2, Y=4
• 1 ultimately trusted, or
• 2 always trusted, or
• 1 always trusted and 2 usually trusted, or
• 4 usually trusted signatures are needed to obtain full legitimacy
PGP/keyandtrustmanagement
21
Example – key legitimacy
X = 1, Y = 2






user
A
B
C
D
E
F
G H
I
J
K
M
L

untrusted / usually untrusted
usually trusted
always trusted
ultimately trusted (you)
signature
legitimate
PGP/keyandtrustmanagement
22
Public-key revocation
 why to revoke a public key?
– suspected to be compromised (private key got known by someone)
– re-keying
 the owner issues a revocation certificate …
– has a similar format to normal public-key certificates
– contains the public key to be revoked
– signed with the corresponding private key
 and disseminates it as widely and quickly as possible
 if a key is compromised:
– e.g., Bob knows the private key of Alice
– Bob can issue a revocation certificate to revoke the public key of Alice
– even better for Alice
PGP/keyandtrustmanagement
23
What is S/MIME?
 Secure / Multipurpose Internet Mail Extension
 a security enhancement to MIME
 provides similar services to PGP
 based on technology from RSA Security
 industry standard for commercial and organizational use
 RFC 2630, 2632, 2633
24
RFC 822
 defines a format for text messages to be sent using e-mail
 Internet standard
 structure of RFC 822 compliant messages
– header lines (e.g., from: …, to: …, cc: …)
– blank line
– body (the text to be sent)
 example
Date: Tue, 16 Jan 1998 10:37:17 (EST)
From: “Levente Buttyan” <buttyan@hit.bme.hu>
Subject: Test
To: afriend@otherhost.bme.hu
Blablabla
S/MIME/introduction
25
Problems with RFC 822 and SMTP
 executable files must be converted into ASCII
– various schemes exist (e.g., Unix UUencode)
– a standard is needed
 text data that includes special characters (e.g., Hungarian text)
 some servers
– reject messages over a certain size
– delete, add, or reorder CR and LF characters
– truncate or wrap lines longer than 76 characters
– remove trailing white space (tabs and spaces)
– pad lines in a message to the same length
– convert tab characters into multiple spaces
S/MIME/introduction
26
MIME
 defines new message header fields
 defines a number of content formats (standardizing
representation of multimedia contents)
 defines transfer encodings that protects the content from
alteration by the mail system
S/MIME/introduction
27
MIME - New header fields
 MIME-Version
 Content-Type
– describes the data contained in the body
– receiving agent can pick an appropriate method to represent the
content
 Content-Transfer-Encoding
– indicates the type of the transformation that has been used to represent
the body of the message
 Content-ID
 Content-Description
– description of the object in the body of the message
– useful when content is not readable (e.g., audio data)
S/MIME/introduction
28
MIME – Content types and subtypes
 text/plain, text/enriched
 image/jpeg, image/gif
 video/mpeg
 audio/basic
 application/postscript, application/octet-stream
 multipart/mixed, multipart/parallel, multipart/alternative,
multipart/digest (each part is message/rfc822)
 message/rfc822, message/partial, message/external-body
S/MIME/introduction
29
MIME – Transfer encodings
 7bit
– short lines of ASCII characters
 8bit
– short lines of non-ASCII characters
 binary
– non-ASCII characters
– lines are not necessarily short
 quoted-printable
– non-ASCII characters are converted into hexa numbers (e.g., =EF)
 base64 (radix 64)
– 3 8-bit blocks into 4 6-bit blocks
 x-token
– non-standard encoding
S/MIME/introduction
30
MIME – Example
MIME-Version: 1.0
From: Nathaniel Borenstein <nsb@nsb.fv.com>
To: Ned Freed <ned@innosoft.com>
Date: Fri, 07 Oct 1994 16:15:05 -0700 (PDT)
Subject: A multipart example
Content-Type: multipart/mixed; boundary=unique-boundary-1
This is the preamble area of a multipart message. Mail readers that understand multipart format
should ignore this preamble. If you are reading this text, you might want to consider changing to a mail reader
that understands how to properly display multipart messages.
--unique-boundary-1
Content-type: text/plain; charset=US-ASCII
… Some text …
--unique-boundary-1
Content-Type: multipart/parallel; boundary=unique-boundary-2
--unique-boundary-2
Content-Type: audio/basic
Content-Transfer-Encoding: base64
... base64-encoded 8000 Hz single-channel mu-law-format audio data goes here ...
--unique-boundary-2
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
... base64-encoded image data goes here ...
--unique-boundary-2--
S/MIME/introduction
31
MIME – Example cont’d
--unique-boundary-1
Content-type: text/enriched
This is <bold><italic>enriched.</italic></bold><smaller>as defined in RFC 1896</smaller>
Isn’t it <bigger><bigger>cool?</bigger></bigger>
--unique-boundary-1
Content-Type: message/rfc822
From: (mailbox in US-ASCII)
To: (address in US-ASCII)
Subject: (subject in US-ASCII)
Content-Type: Text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: Quoted-printable
... Additional text in ISO-8859-1 goes here ...
--unique-boundary-1--
S/MIME/introduction
32
S/MIME services
 enveloped data (application/pkcs7-mime; smime-type = enveloped-data)
– standard digital envelop
 signed data (application/pkcs7-mime; smime-type = signed-data)
– standard digital signature (“hash and sign”)
– content + signature is encoded using base64 encoding
 clear-signed data (multipart/signed)
– standard digital signature
– only the signature is encoded using base64
– recipient without S/MIME capability can read the message but cannot
verify the signature
 signed and enveloped data
– signed and encrypted entities may be nested in any order
S/MIME/services
33
Cryptographic algorithms
 message digest
– must: SHA-1
– should (receiver): MD5 (backward compatibility)
 digital signature
– must: DSS
– should: RSA
 asymmetric-key encryption
– must: ElGamal
– should: RSA
 symmetric-key encryption
– sender:
• should: 3DES, RC2/40
– receiver:
• must: 3DES
• should: RC2/40
S/MIME/services
34
Securing a MIME entity
 MIME entity is prepared according to the normal rules for MIME
message preparation
 prepared MIME entity is processed by S/MIME to produce a
PKCS object
 the PKCS object is treated as message content and wrapped in
MIME
S/MIME/services
35
PKCS7 “signed data”
Version
(Set of) Digest Algorithms
Content Info
Set of certificates
Set of CRLs
Signer Info
Version
Signer ID (issuer and ser. no.)
Digest Algorithm
Authenticated Attributes
Digest Encryption Alg.
Encrypted digest (signature)
Content type
Content
S/MIME/messageformats
36
PKCS7 “enveloped data”
Version
Encrypted Content Info
Recipient Info
Version
Recipient ID (issuer and s.no.)
Key Encryption Algorithm
Encrypted Key
Content Encryption Alg.
Content type
Encrypted Content
Originator Info
S/MIME/messageformats
37
Enveloped data – Example
Content-Type: application/pkcs7-mime; smime-type=enveloped-data; name=smime.p7m
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7m
rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6
7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H
f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4
0GhIGfHfQbnj756YT64V
S/MIME/messageformats
38
Clear-signed data – Example
Content-Type: multipart/signed; protocol="application/pkcs7-signature";
micalg=sha1; boundary=boundary42
--boundary42
Content-Type: text/plain
This is a clear-signed message.
--boundary42
Content-Type: application/pkcs7-signature; name=smime.p7s
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7s
ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6
4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj
n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4
7GhIGfHfYT64VQbnj756
--boundary42--
S/MIME/messageformats
39
Key management
 S/MIME certificates are X.509 conformant
 key management scheme is between strict certification hierarchy and
PGP’s web of trust
– certificates are signed by certification authorities (CA)
– key authentication is based on chain of certificates
– users/managers are responsible to configure their clients with a list of trusted
root keys
K
S/MIME/keymanagement

More Related Content

What's hot

Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption Standard
Dr.Florence Dayana
 
Hash Function
Hash FunctionHash Function
Hash Function
Siddharth Srivastava
 
Transport layer security (tls)
Transport layer security (tls)Transport layer security (tls)
Transport layer security (tls)
Kalpesh Kalekar
 
Cryptography
CryptographyCryptography
Cryptography
jayashri kolekar
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
Dr.Florence Dayana
 
Pgp
PgpPgp
Pretty good privacy
Pretty good privacyPretty good privacy
Pretty good privacy
Pushkar Dutt
 
Cryptography
CryptographyCryptography
Cryptography
Darshini Parikh
 
Electronic mail security
Electronic mail securityElectronic mail security
Electronic mail security
Dr.Florence Dayana
 
Introduction to Digital signatures
Introduction to Digital signaturesIntroduction to Digital signatures
Introduction to Digital signaturesRohit Bhat
 
MD-5 : Algorithm
MD-5 : AlgorithmMD-5 : Algorithm
MD-5 : Algorithm
Sahil Kureel
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.pptUday Meena
 
Basic cryptography
Basic cryptographyBasic cryptography
Basic cryptography
Perfect Training Center
 
CISSP - Chapter 3 - Cryptography
CISSP - Chapter 3 - CryptographyCISSP - Chapter 3 - Cryptography
CISSP - Chapter 3 - Cryptography
Karthikeyan Dhayalan
 
Trusted systems
Trusted systemsTrusted systems
Trusted systems
ahmad abdelhafeez
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
Krishna Gehlot
 
Message digest 5
Message digest 5Message digest 5
Message digest 5
Tirthika Bandi
 
An introduction to X.509 certificates
An introduction to X.509 certificatesAn introduction to X.509 certificates
An introduction to X.509 certificates
Stephane Potier
 
Web Security
Web SecurityWeb Security
Web Security
Dr.Florence Dayana
 
Cryptography
CryptographyCryptography
Cryptography
subodh pawar
 

What's hot (20)

Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption Standard
 
Hash Function
Hash FunctionHash Function
Hash Function
 
Transport layer security (tls)
Transport layer security (tls)Transport layer security (tls)
Transport layer security (tls)
 
Cryptography
CryptographyCryptography
Cryptography
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Pgp
PgpPgp
Pgp
 
Pretty good privacy
Pretty good privacyPretty good privacy
Pretty good privacy
 
Cryptography
CryptographyCryptography
Cryptography
 
Electronic mail security
Electronic mail securityElectronic mail security
Electronic mail security
 
Introduction to Digital signatures
Introduction to Digital signaturesIntroduction to Digital signatures
Introduction to Digital signatures
 
MD-5 : Algorithm
MD-5 : AlgorithmMD-5 : Algorithm
MD-5 : Algorithm
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Basic cryptography
Basic cryptographyBasic cryptography
Basic cryptography
 
CISSP - Chapter 3 - Cryptography
CISSP - Chapter 3 - CryptographyCISSP - Chapter 3 - Cryptography
CISSP - Chapter 3 - Cryptography
 
Trusted systems
Trusted systemsTrusted systems
Trusted systems
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
 
Message digest 5
Message digest 5Message digest 5
Message digest 5
 
An introduction to X.509 certificates
An introduction to X.509 certificatesAn introduction to X.509 certificates
An introduction to X.509 certificates
 
Web Security
Web SecurityWeb Security
Web Security
 
Cryptography
CryptographyCryptography
Cryptography
 

Similar to Pgp smime

module 4_7th sem_ Electronic Mail Security.pptx
module 4_7th sem_ Electronic Mail Security.pptxmodule 4_7th sem_ Electronic Mail Security.pptx
module 4_7th sem_ Electronic Mail Security.pptx
prateekPallav2
 
Presentation about RSA
Presentation about RSAPresentation about RSA
Presentation about RSA
Srilal Buddika
 
Moein
MoeinMoein
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
Nagendra Um
 
Cupdf.com public key-cryptography-569692953829a
Cupdf.com public key-cryptography-569692953829aCupdf.com public key-cryptography-569692953829a
Cupdf.com public key-cryptography-569692953829a
jsk1950
 
Cryptography
CryptographyCryptography
Cryptography
Mrinalini Sharma
 
Cryptography Key Management.pptx
Cryptography Key Management.pptxCryptography Key Management.pptx
Cryptography Key Management.pptx
SurendraBasnet6
 
Network security cs9 10
Network security  cs9 10Network security  cs9 10
Network security cs9 10
Infinity Tech Solutions
 
TLS/SSL Internet Security Talk
TLS/SSL Internet Security TalkTLS/SSL Internet Security Talk
TLS/SSL Internet Security Talk
Nisheed KM
 
Rsa diffi-network security-itt
Rsa diffi-network security-ittRsa diffi-network security-itt
Rsa diffi-network security-ittrameshvvv
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006
Nate Lawson
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
Harry Potter
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
James Wong
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
Young Alista
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
David Hoen
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
Tony Nguyen
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
Luis Goldster
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
Fraboni Ec
 
Applying Security Algorithms Using openSSL crypto library
Applying Security Algorithms Using openSSL crypto libraryApplying Security Algorithms Using openSSL crypto library
Applying Security Algorithms Using openSSL crypto library
Priyank Kapadia
 

Similar to Pgp smime (20)

Introduction to cryptography
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptography
 
module 4_7th sem_ Electronic Mail Security.pptx
module 4_7th sem_ Electronic Mail Security.pptxmodule 4_7th sem_ Electronic Mail Security.pptx
module 4_7th sem_ Electronic Mail Security.pptx
 
Presentation about RSA
Presentation about RSAPresentation about RSA
Presentation about RSA
 
Moein
MoeinMoein
Moein
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
Cupdf.com public key-cryptography-569692953829a
Cupdf.com public key-cryptography-569692953829aCupdf.com public key-cryptography-569692953829a
Cupdf.com public key-cryptography-569692953829a
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography Key Management.pptx
Cryptography Key Management.pptxCryptography Key Management.pptx
Cryptography Key Management.pptx
 
Network security cs9 10
Network security  cs9 10Network security  cs9 10
Network security cs9 10
 
TLS/SSL Internet Security Talk
TLS/SSL Internet Security TalkTLS/SSL Internet Security Talk
TLS/SSL Internet Security Talk
 
Rsa diffi-network security-itt
Rsa diffi-network security-ittRsa diffi-network security-itt
Rsa diffi-network security-itt
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
 
Introduction to security_and_crypto
Introduction to security_and_cryptoIntroduction to security_and_crypto
Introduction to security_and_crypto
 
Applying Security Algorithms Using openSSL crypto library
Applying Security Algorithms Using openSSL crypto libraryApplying Security Algorithms Using openSSL crypto library
Applying Security Algorithms Using openSSL crypto library
 

Recently uploaded

急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
VivekSinghShekhawat2
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 

Recently uploaded (20)

急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 

Pgp smime

  • 2. 2 Outline  PGP – services – message format – key management – trust management  S/MIME – services – message formats – key management
  • 3. 3 What is PGP?  PGP - Pretty Good Privacy  general purpose application to protect (encrypt and/or sign) files  can be used to protect e-mail messages  can be used by corporations as well as individuals  based on strong cryptographic algorithms (IDEA, RSA, SHA-1)  available free of charge at http://www.pgpi.org  first version developed by Phil Zimmermann  PGP is now on an Internet standards track (RFC 3156)
  • 4. 4 PGP services  messages – authentication – confidentiality – compression – e-mail compatibility – segmentation and reassembly  key management – generation, distribution, and revocation of public/private keys – generation and transport of session keys and IVs PGP/services
  • 5. 5 Message authentication  based on digital signatures  supported algorithms: RSA/SHA and DSS/SHA hashhash encenc hashhash decdeccomparecompare accept / reject m h σ Ksnd -1 Ksnd m h σh senderreceiver PGP/services
  • 6. 6 Message confidentiality  symmetric key encryption in CFB mode with a random session key and IV  session key and IV is encrypted with the public key of the receiver  supported algorithms: – symmetric: CAST, IDEA, 3DES – asymmetric: RSA, ElGamal prngprng s.encs.enc m Krcv sender a.enca.enc k, iv {m}k {k, iv}Krcv PGP/services
  • 7. 7 Compression  applied after the signature – enough to store clear message and signature for later verification – it would be possible to dynamically compress messages before signature verification, but … – then all PGP implementations should use the same compression algorithm – however, different PGP versions use slightly different compression algorithms  applied before encryption – compression reduces redundancy → makes cryptanalysis harder  supported algorithm: ZIP PGP/services
  • 8. 8 E-mail compatibility  encrypted messages and signatures may contain arbitrary octets  most e-mail systems support only ASCII characters  PGP converts an arbitrary binary stream into a stream of printable ASCII characters  radix 64 conversion: 3 8-bit blocks → 4 6-bit blocks 0 7 0 7 0 7 0 5 0 5 0 5 0 5 character encoding 6-bit value 52 0 … … 61 9 62 + 63 / (pad) = 0 A … ... 25 Z 26 a … … 51 z character encoding 6-bit value PGP/services
  • 9. 9 Combining services X := fileX := file signature?signature? compress X := Z(X) compress X := Z(X) encryption?encryption? radix 64 X := R64(X) radix 64 X := R64(X) generate signature X := σ(X) || X generate signature X := σ(X) || X generate envelop X := {k}Krcv || {X}k generate envelop X := {k}Krcv || {X}k yes yes no no PGP/services
  • 10. 10 PGP message format session key component signature message key ID of Krcv session key k timestamp key ID of Ksnd leading two octets of hash hash filename timestamp data {}Krcv{}Ksnd -1 {}k ZIP R64 PGP/messageformat
  • 11. 11 Key IDs  a user may have several public key – private key pairs – which private key to use to decrypt the session key? – which public key to use to verify a signature?  transmitting the whole public key would be wasteful  associating a random ID to a public key would result in management burden  PGP key ID: least significant 64 bits of the public key – unique within a user with very high probability PGP/keyandtrustmanagement
  • 12. 12 Random number generation  true random numbers – used to generate public key – private key pairs – provide the initial seed for the pseudo-random number generator (PRNG) – provide additional input during pseudo-random number generation  pseudo-random numbers – used to generate session keys and IVs PGP/keyandtrustmanagement
  • 13. 13 True random numbers  PGP maintains a 256-byte buffer of random bits  each time PGP expects a keystroke from the user, it records – the time when it starts waiting (32 bits) – the time when the key was pressed (32 bits) – the value of the key stroke (8 bits)  the recorded information is used to generate a key  the generated key is used to encrypt the current value of the random-bit buffer PGP/keyandtrustmanagement
  • 14. 14 Pseudo-random numbers  based on the ANSI X9.17 PRNG standard 3DES3DES 3DES3DES 3DES3DES + + DTi Vi Vi+1 K1, K2 Ri PGP/keyandtrustmanagement
  • 15. 15 Pseudo-random numbers EE EE EE+ + EE EE+ + EE EE+ + + + + dtbuf rseed rseed’ IV[0..7] K[8..15] K[0..7] true random bits  CAST-128 is used instead of 3DES with key rkey PGP/keyandtrustmanagement
  • 16. 16 Pseudo-random numbers  dtbuf[0..3] = current time, dtbuf[4..7] = 0  pre-wash – take the hash of the message • this has already been generated if the message is being signed • otherwise the first 4K of the message is hashed – use the result as a key, use a null IV, and encrypt (rkey, rseed)previous in CFB mode • if (rkey, rseed)previous is empty, it is filled up with true random bits – set (rkey, rseed)current to the result of the encryption  post-wash – generate 24 more bytes as before but without XORing in true random bytes – encrypt the result in CFB mode using K and IV – set (rkey, rseed)previous to the result of the encryption PGP/keyandtrustmanagement
  • 17. 17 Private-key ring  used to store the public key – private key pairs owned by a given user  essentially a table, where each row contains the following entries: – timestamp – key ID (indexed) – public key – encrypted private key – user ID (indexed) encencpassphrase hashhash private key encrypted private key PGP/keyandtrustmanagement
  • 18. 18 Public-key ring  used to store public keys of other users  a table, where each row contains the following entries: – timestamp – key ID (indexed) – public key – user ID (indexed) – owner trust – signature(s) – signature trust(s) – key legitimacy PGP/keyandtrustmanagement
  • 19. 19 Trust management  owner trust – assigned by the user – possible values: • unknown user • usually not trusted to sign • usually trusted to sign • always trusted to sign • ultimately trusted (own key, present in private key ring)  signature trust – assigned by the PGP system – if the corresponding public key is already in the public-key ring, then its owner trust entry is copied into signature trust – otherwise, signature trust is set to unknown user PGP/keyandtrustmanagement
  • 20. 20 Trust management  key legitimacy – computed by the PGP system – if at least one signature trust is ultimate, then the key legitimacy is 1 (complete) – otherwise, a weighted sum of the signature trust values is computed • always trusted signatures has a weight of 1/X • usually trusted signatures has a weight of 1/Y • X, Y are user-configurable parameters – example: X=2, Y=4 • 1 ultimately trusted, or • 2 always trusted, or • 1 always trusted and 2 usually trusted, or • 4 usually trusted signatures are needed to obtain full legitimacy PGP/keyandtrustmanagement
  • 21. 21 Example – key legitimacy X = 1, Y = 2       user A B C D E F G H I J K M L  untrusted / usually untrusted usually trusted always trusted ultimately trusted (you) signature legitimate PGP/keyandtrustmanagement
  • 22. 22 Public-key revocation  why to revoke a public key? – suspected to be compromised (private key got known by someone) – re-keying  the owner issues a revocation certificate … – has a similar format to normal public-key certificates – contains the public key to be revoked – signed with the corresponding private key  and disseminates it as widely and quickly as possible  if a key is compromised: – e.g., Bob knows the private key of Alice – Bob can issue a revocation certificate to revoke the public key of Alice – even better for Alice PGP/keyandtrustmanagement
  • 23. 23 What is S/MIME?  Secure / Multipurpose Internet Mail Extension  a security enhancement to MIME  provides similar services to PGP  based on technology from RSA Security  industry standard for commercial and organizational use  RFC 2630, 2632, 2633
  • 24. 24 RFC 822  defines a format for text messages to be sent using e-mail  Internet standard  structure of RFC 822 compliant messages – header lines (e.g., from: …, to: …, cc: …) – blank line – body (the text to be sent)  example Date: Tue, 16 Jan 1998 10:37:17 (EST) From: “Levente Buttyan” <buttyan@hit.bme.hu> Subject: Test To: afriend@otherhost.bme.hu Blablabla S/MIME/introduction
  • 25. 25 Problems with RFC 822 and SMTP  executable files must be converted into ASCII – various schemes exist (e.g., Unix UUencode) – a standard is needed  text data that includes special characters (e.g., Hungarian text)  some servers – reject messages over a certain size – delete, add, or reorder CR and LF characters – truncate or wrap lines longer than 76 characters – remove trailing white space (tabs and spaces) – pad lines in a message to the same length – convert tab characters into multiple spaces S/MIME/introduction
  • 26. 26 MIME  defines new message header fields  defines a number of content formats (standardizing representation of multimedia contents)  defines transfer encodings that protects the content from alteration by the mail system S/MIME/introduction
  • 27. 27 MIME - New header fields  MIME-Version  Content-Type – describes the data contained in the body – receiving agent can pick an appropriate method to represent the content  Content-Transfer-Encoding – indicates the type of the transformation that has been used to represent the body of the message  Content-ID  Content-Description – description of the object in the body of the message – useful when content is not readable (e.g., audio data) S/MIME/introduction
  • 28. 28 MIME – Content types and subtypes  text/plain, text/enriched  image/jpeg, image/gif  video/mpeg  audio/basic  application/postscript, application/octet-stream  multipart/mixed, multipart/parallel, multipart/alternative, multipart/digest (each part is message/rfc822)  message/rfc822, message/partial, message/external-body S/MIME/introduction
  • 29. 29 MIME – Transfer encodings  7bit – short lines of ASCII characters  8bit – short lines of non-ASCII characters  binary – non-ASCII characters – lines are not necessarily short  quoted-printable – non-ASCII characters are converted into hexa numbers (e.g., =EF)  base64 (radix 64) – 3 8-bit blocks into 4 6-bit blocks  x-token – non-standard encoding S/MIME/introduction
  • 30. 30 MIME – Example MIME-Version: 1.0 From: Nathaniel Borenstein <nsb@nsb.fv.com> To: Ned Freed <ned@innosoft.com> Date: Fri, 07 Oct 1994 16:15:05 -0700 (PDT) Subject: A multipart example Content-Type: multipart/mixed; boundary=unique-boundary-1 This is the preamble area of a multipart message. Mail readers that understand multipart format should ignore this preamble. If you are reading this text, you might want to consider changing to a mail reader that understands how to properly display multipart messages. --unique-boundary-1 Content-type: text/plain; charset=US-ASCII … Some text … --unique-boundary-1 Content-Type: multipart/parallel; boundary=unique-boundary-2 --unique-boundary-2 Content-Type: audio/basic Content-Transfer-Encoding: base64 ... base64-encoded 8000 Hz single-channel mu-law-format audio data goes here ... --unique-boundary-2 Content-Type: image/jpeg Content-Transfer-Encoding: base64 ... base64-encoded image data goes here ... --unique-boundary-2-- S/MIME/introduction
  • 31. 31 MIME – Example cont’d --unique-boundary-1 Content-type: text/enriched This is <bold><italic>enriched.</italic></bold><smaller>as defined in RFC 1896</smaller> Isn’t it <bigger><bigger>cool?</bigger></bigger> --unique-boundary-1 Content-Type: message/rfc822 From: (mailbox in US-ASCII) To: (address in US-ASCII) Subject: (subject in US-ASCII) Content-Type: Text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-printable ... Additional text in ISO-8859-1 goes here ... --unique-boundary-1-- S/MIME/introduction
  • 32. 32 S/MIME services  enveloped data (application/pkcs7-mime; smime-type = enveloped-data) – standard digital envelop  signed data (application/pkcs7-mime; smime-type = signed-data) – standard digital signature (“hash and sign”) – content + signature is encoded using base64 encoding  clear-signed data (multipart/signed) – standard digital signature – only the signature is encoded using base64 – recipient without S/MIME capability can read the message but cannot verify the signature  signed and enveloped data – signed and encrypted entities may be nested in any order S/MIME/services
  • 33. 33 Cryptographic algorithms  message digest – must: SHA-1 – should (receiver): MD5 (backward compatibility)  digital signature – must: DSS – should: RSA  asymmetric-key encryption – must: ElGamal – should: RSA  symmetric-key encryption – sender: • should: 3DES, RC2/40 – receiver: • must: 3DES • should: RC2/40 S/MIME/services
  • 34. 34 Securing a MIME entity  MIME entity is prepared according to the normal rules for MIME message preparation  prepared MIME entity is processed by S/MIME to produce a PKCS object  the PKCS object is treated as message content and wrapped in MIME S/MIME/services
  • 35. 35 PKCS7 “signed data” Version (Set of) Digest Algorithms Content Info Set of certificates Set of CRLs Signer Info Version Signer ID (issuer and ser. no.) Digest Algorithm Authenticated Attributes Digest Encryption Alg. Encrypted digest (signature) Content type Content S/MIME/messageformats
  • 36. 36 PKCS7 “enveloped data” Version Encrypted Content Info Recipient Info Version Recipient ID (issuer and s.no.) Key Encryption Algorithm Encrypted Key Content Encryption Alg. Content type Encrypted Content Originator Info S/MIME/messageformats
  • 37. 37 Enveloped data – Example Content-Type: application/pkcs7-mime; smime-type=enveloped-data; name=smime.p7m Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7m rfvbnj756tbBghyHhHUujhJhjH77n8HHGT9HG4VQpfyF467GhIGfHfYT6 7n8HHGghyHhHUujhJh4VQpfyF467GhIGfHfYGTrfvbnjT6jH7756tbB9H f8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 0GhIGfHfQbnj756YT64V S/MIME/messageformats
  • 38. 38 Clear-signed data – Example Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary=boundary42 --boundary42 Content-Type: text/plain This is a clear-signed message. --boundary42 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=smime.p7s ghyHhHUujhJhjH77n8HHGTrfvbnj756tbB9HG4VQpfyF467GhIGfHfYT6 4VQpfyF467GhIGfHfYT6jH77n8HHGghyHhHUujhJh756tbB9HGTrfvbnj n8HHGTrfvhJhjH776tbB9HG4VQbnj7567GhIGfHfYT6ghyHhHUujpfyF4 7GhIGfHfYT64VQbnj756 --boundary42-- S/MIME/messageformats
  • 39. 39 Key management  S/MIME certificates are X.509 conformant  key management scheme is between strict certification hierarchy and PGP’s web of trust – certificates are signed by certification authorities (CA) – key authentication is based on chain of certificates – users/managers are responsible to configure their clients with a list of trusted root keys K S/MIME/keymanagement