Mod4 Computer Security
Mod4 Computer Security
Mod4 Computer Security
Email Security
PGP is mainly used for personal email security .It is an effort of a single person Phil
Zimmermann in 1991. PGP provides privacy,authentication,integrity and non-
repudiation.
Features
1
Authentication
M-Plain Message
H-Hash Function
EP-Public Key Encryption
DP-Public key Decryption
PRa-Private Key of user A
PUa-Public key of a user A
Z-Compression
||- Concatenation
Z-1-Inverse Compression
Sender:
1. Generates message and a random number (session key) only for this message
2. Encrypts message with the session key using AES, 3DES, IDEA or CAST-128
3. Encrypts session key itself with recipient’s public key using RSA
4. Attaches it to message
Receiver:
2
Confidentiality & Authentication
EC-Symmetric Encryption
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 Z - 1 for decompression is critical. The compression algorithm used
is ZIP.
1. so that one can store only the uncompressed message together with signature for
later verification
3
2. Applying the hash function and signature after compression would constrain all
PGP implementations to the same version of the compression algorithm as the
PGP compression algorithm is not deterministic
Message encryption is applied after compression to strengthen
cryptographic security. Because the compressed message has less
redundancy than the original plaintext, cryptanalysis is more difficult.
Email Compatibility
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.
Segmentation/Reassembly
E-mail facilities often are restricted to a maximum message length. For example,
many of the facilities accessible through the Internet impose a maximum length of
50,000 octets. Any message longer than that must be broken up into smaller
segments, each of which is mailed separately.
4
Four Aspects of PGP
PGP was designed to provide all four aspects of security, i.e., privacy,
integrity, authentication, and non-repudiation in the sending of email.
5
PGP at the Receiver site
The receiver receives the combination of encrypted secret key and message
digest is received.
The encrypted secret key is decrypted by using the sender's private key to get
the one-time secret key.
The secret key is then used to decrypt the combination of message and digest.
The digest is decrypted by using the sender's public key, and the original
message is hashed by using a hash function to create a digest.
Both the digests are compared if both of them are equal means that all the
aspects of security are preserved.
6
The Administration is difficult: The different versions of PGP complicate the
administration.
Compatibility issues: Both the sender and the receiver must have compatible
versions of PGP. For example, if you encrypt an email by using PGP with one of
the encryption technique, the receiver has a different version of PGP which
cannot read the data.
Complexity: PGP is a complex technique. Other security schemes use
symmetric encryption that uses one key or asymmetric encryption that uses two
different keys. PGP uses a hybrid approach that implements symmetric
encryption with two keys. PGP is more complex, and it is less familiar than the
traditional symmetric or asymmetric methods.
No Recovery: Computer administrators face the problems of losing their
passwords. In such situations, an administrator should use a special program to
retrieve passwords. For example, a technician has physical access to a PC
which can be used to retrieve a password. However, PGP does not offer such a
special program for recovery; encryption methods are very strong so, it does not
retrieve the forgotten passwords results in lost messages or lost files.
S/MIME
Executable files or other binary objects must be converted into ASCII. Various
schemes exist (e.g., Unix UUencode), but a standard is needed
7
Text data that includes special characters (e.g., Hungarian text) cannot be
transmitted as SMTP is limited to 7-bit ASCII
Some servers reject mail messages over a certain size
Some common problems exist with the SMTP implementations which do not
adhere completely to the SMTP standards defined in RFC 821. They are:
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
1. Five new message header fields are defined, which provide information about the
body of the message.
3. Transfer encodings are defined that protect the content from alteration by the mail
system.
MIME-Version: Must have the parameter value 1.0. This field indicates that the
message conforms to RFCs 2045 and 2046.
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.
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.
8
Content-ID: Used to identify MIME entities uniquely in multiple contexts.
Content-Description: A text description of the object with the body; this is useful
when the object is not readable (e.g., audio data).
S/MIME Functionality
S/MIME has a very similar functionality to PGP. Both offer the ability to sign and/or
encrypt messages.
Functions
Enveloped data: This consists of encrypted content of any type and encrypted
content encryption keys for one or more recipients.
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.
Clear-signed data: As with signed data, a digital signature of the content is
formed. However, in this case, only the digital signature is encoded using base64.
As a result, recipients without S/MIME capability can view the message content,
although they cannot verify the signature.
Signed and enveloped data: Signed-only and encrypted-only entities may be
nested, so that encrypted data may be signed and signed data or clear-signed data
may be encrypted.
Cryptographic Algorithms
S/MIME uses the following terminology, taken from RFC 2119 to specify the
requirement level:
9
IP Security Overview
Internet Protocol security (IPsec) is a framework of open standards for
protecting communications over Internet Protocol (IP) networks through the use of
cryptographic security services. IPsec supports network-level peer authentication,
data origin authentication, data integrity, data confidentiality (encryption), and replay
protection.
Applications of IPsec
IPsec provides the capability to secure communications across a LAN, across
private and public wide area networks (WAN’s), and across the Internet.
• Secure branch office connectivity over the Internet: A company can build a secure
virtual private network over the Internet or over a public WAN. This enables a
business to rely heavily on the Internet and reduce its need for private networks,
saving costs and network management overhead.
• Secure remote access over the Internet: An end user whose system is equipped
with IP security protocols can make a local call to an Internet service provider (ISP)
and gain secure access to a company network. This reduces the cost of toll
charges for travelling employees and telecommuters.
• Establishing extranet and intranet connectivity with partners: IPsec can be used
to secure communication with other organizations, ensuring authentication and
confidentiality and providing a key exchange mechanism.
• Enhancing electronic commerce security: Even though some Web and electronic
commerce applications have built-in security protocols, the use of IPsec enhances
that security.
10
The principal feature of IPsec enabling it to support varied applications is that it can
encrypt and/or authenticate all traffic at IP level. Thus, all distributed applications,
including remote logon, client/server, e-mail, file transfer, Web access, and so on,
can be secured.
Benefits of IPsec
• IPsec can provide security for individual users if needed (useful for offsite workers
and setting up a secure virtual sub network for sensitive applications)
11
IP Security Architecture
To understand IP Security architecture, we examine IPsec documents first and then
move on to IPsec services and Security Associations.
IPsec Documents
The IPsec specification consists of numerous documents. The most important of these,
issued in November of 1998, are RFCs 2401, 2402, 2406, and 2408:
• RFC 2401: An overview of security architecture.
• RFC 2402: Description of a packet authentication extension to IPv4 and IPv6.
• RFC 2406: Description of a packet encryption extension to IPv4 and IPv6.
• RFC 2408: Specification of key management capabilities.
The documents are divided into seven groups, as depicted in following figure:
12
Architecture: Covers the general concepts, security requirements, definitions, and
mechanisms defining IPsec technology
• Encapsulating Security Payload (ESP): Covers the packet format and general
issues related to the use of the ESP for packet encryption and, optionally,
authentication.
• Authentication Header (AH): Covers the packet format and general issues related to
the use of AH for packet authentication.
• Encryption Algorithm: A set of documents that describe how various encryption
algorithms are used for ESP.
• Authentication Algorithm: A set of documents that describe how various
authentication algorithms are used for AH and for the authentication option of ESP.
• Key Management: Documents that describe key management schemes.
• Domain of Interpretation (DOI): Contains values needed for the other documents to
relate to each other. These include identifiers for approved encryption and
authentication algorithms, as well as operational parameters such as key lifetime.
IPsec Services
The IPsec services are as follows:
13
Access Control:- The cryptographic keys are distributed and the traffic flow is
controlled in both AH and ESP protocols, which is done to accomplish access
control over the data transmission.
14
IPSec Authentication Header
• Next Header (8 bits): Identifies the type of header immediately following this header.
• Payload Length (8 bits): Length of Authentication Header in 32-bit words, minus 2.
For example, the default length of the authentication data field is 96 bits, or three 32-bit
words. With a three-word fixed header, there are a total of six words in the header, and
the Payload Length field has a value of 4.
• Reserved (16 bits): For future use.
• Security Parameters Index (32 bits): Identifies a security association.
• Sequence Number (32 bits): A monotonically increasing counter value, discussed
later.
• Authentication Data (variable): A variable-length field (must be an integral number
of 32-bit words) that contains the Integrity Check Value (ICV), or MAC, for this packet.
15
IPSec ESP format
Security Parameters Index (32 bits): Identifies a security association.
Sequence Number (32 bits): A monotonically increasing counter value; this
provides an anti-replay function, as discussed for AH.
Payload Data (variable): This is a transport-level segment (transport mode) or
IP packet (tunnel mode) that is protected by encryption.
Padding (0-255 bytes): This field is used to make the length of the plaintext to
be a multiple of some desired number of bytes. It is also added to provide
confidentiality.
Pad Length (8 bits): Indicates the number of pad bytes immediately preceding
this field.
Next Header (8 bits): Identifies the type of data contained in the payload data
field by identifying the first header in that payload (for example, an extension
header in IPv6, or an upper-layer protocol such as TCP).
Authentication Data (variable): A variable-length field (must be an integral
number of 32-bit words) that contains the Integrity Check Value computed over
the ESP packet minus the Authentication Data field.
16