NS Unit-3
NS Unit-3
NS Unit-3
UNIT-3
Topics:
• PGP was designed to provide all four aspects of security, i.e., privacy, integrity,
authentication, and non-repudiation in the sending of email.
• PGP uses a digital signature (a combination of hashing and public key encryption) to
provide integrity, authentication, and non-repudiation. PGP uses a combination of
secret key encryption and public key encryption to provide privacy. Therefore, we can
say that the digital signature uses one hash function, one secret key, and two
private-public key pairs.
• PGP is an open source and freely available software package for email security.
• PGP provides authentication through the use of Digital Signature.
• It provides confidentiality through the use of symmetric block encryption.
• It provides compression by using the ZIP algorithm, and EMAIL compatibility using the
radix-64 encoding scheme.
PGP
► PGP has grown explosively and is now very widely used. A number of reasons
are sited for such growth:
► It is available free worldwide in versions that run on many different
platforms, Windows, UNIX, Mac etc. In addition the commercial version
satisfies those who want vendor support.
► 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.
► It has a wide range of applicability, encrypting files and messages to
individuals who wish to communicate securely with others worldwide over the
Internet.
PGP
PGP’s another service is confidentiality, which is encrypting messages for transmitting or to store
files locally.
• In both cases, the symmetric encryption algorithm CAST-128 may be used. Alternatively, IDEA or
3DES may be used. And the 64-bit cipher feedback (CFB) mode is used.
• In PGP, each symmetric key is used only once. The session key is bound to the message. To
protect the key, it is encrypted with the receiver’s public key.
PGP
1. The sender generates a message and a random 128-bit number to be used as a session key for this
message only.
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.
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
PGP
Confidentiality & Authentication
• 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).
• In summary, when both services are used, the sender first signs the message
with its own private key, then encrypts the message with a session key, and
finally encrypts the session key with the recipient’s public key.
PGP
Compression
• 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.
• Z for compression and Z–1 for decompression
The signature is generated before compression for two reasons:
• It is preferable to sign an uncompressed message so that one can store only the uncompressed
message together with the signature for future verification.
• If you generate signature after compression then there is a need recompression for message
verification, PGP’s compression algorithm presents a difficulty.
► Message encryption is applied after compression to strengthen cryptographic security. Therefore
cryptanalysis is more difficult.
• The compression algorithm used here is ZIP Algorithm
PGP
E-Mail-Compatibility
► E-mail facilities often are restricted to a maximum length. To accommodate this, PGP
automatically subdivides a message that is too large into segments that are small enough to send
via e-mail.
► The segmentation is done after all of the other processing, including the radix-64 conversion.
Cryptographic Keys and Key Rings
• These keys need to be stored and organized in a systematic way for efficient
and effective use by all parties.
• The scheme used in PGP is one to store the public/private key pairs owned by
that node and one to store the public keys of other users known at this node.
• These key rings are referred to, respectively, as the private-key ring and the
public-key ring.
Private-key Ring
We can view the ring as a table in which each row represents one of the public/private key pairs
owned by this user.
Each row contains the entries:
• Timestamp: The date/time when this key pair was generated.
• Key ID: The least significant 64 bits of the public key.
• Public key: The public-key portion of the pair.
• Private key: The private-key portion of the pair, this field is encrypted.
• User ID: Typically, this will be the user’s e-mail address
Public-key Ring
► This ring is used to store public keys of other users that are known to this
user.
► enveloped data
► encrypted content and associated keys
► signed data
► encoded message + signed digest
► clear-signed data
► cleartext message + encoded signed digest
► signed & enveloped data
► nesting of signed & encrypted entities
S/MIME Cryptographic Algorithms