CS8792 UNIT 5 Notes
CS8792 UNIT 5 Notes
CS8792 UNIT 5 Notes
com
PANIMALAR ENGINEERING COLLEGE
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
The receiver uses RSA with the sender‟s public key to decrypt and recover the
hash code.
The receiver generates a new hash code for the message and compares it with
the decrypted hash code. If the two match, the message is accepted as
authentic.
2. Confidentiality
Confidentiality is provided by encrypting messages to be transmitted or to be stored
locally as files. In both cases, the conventional encryption algorithm CAST-128 may be used.
The 64-bit cipher feedback (CFB) mode is used. In PGP, each conventional key is used
only once. That is, a new key is generated as a random 128-bit number for each message. Thus
although this is referred to as a session key, it is in reality a onetime key. To protect the key, it
is encrypted with the receiver‟s public key.
The sequence for confidentiality is as follows:
The sender generates a message and a random 128-bit number to be used as a
session key for this message only.
The message is encrypted using CAST-128 with the session key.
The session key is encrypted with RSA, using the receiver‟s public key and is
prepended to the message.
The receiver uses RSA with its private key to decrypt and recover the session
key.
The session key is used to decrypt the message.
Confidentiality and authentication
Here both services may be used for the same message. First, a signature is generated
for the plaintext message and prepended to the message. Then the plaintext plus the signature
is encrypted using CAST-128 and the session key is encrypted using RSA.
3. Compression
As a default, PGP compresses the message after applying the signature but before
encryption. This has the benefit of saving space for both e-mail transmission and for file storage.
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 one
signed a compressed document, then it would be necessary either to store a
compressed version of the message for later verification or to recompress the
message when verification is required.
Even if one were willing to generate dynamically a recompressed message from
verification, PGP‟s compression algorithm presents a difficulty. The algorithm is not
deterministic; various implementations of the algorithm achieve different tradeoffs in
running speed versus compression ratio and as a result, produce different
compression forms.
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. The compression algorithm used is ZIP
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 3 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
4. E-mail compatibility
Many electronic mail systems only permit the use of blocks consisting of ASCII texts. To
accommodate this restriction, PGP provides the service of converting the raw 8-bit binary
stream to a stream of printable ASCII characters. The scheme used for this purpose is radix-64
conversion. Each group of three octets of binary data is mapped into four ASCII characters.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 4 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
The solution adopted by PGP is to assign a key ID to each public key that is, with very
high probability, unique within a user ID. The key ID associated with each public key consists of
its least significant 64 bits. i.e., the key ID of public key KUa is (KUa mod 264).
A message consists of three components.
Message component – includes actual data to be transmitted, as well as the
filename and a timestamp that specifies the time of creation
Session key component – includes session key and the identifier of the recipient
public key.
Signature component – includes the following
Timestamp – time at which the signature was made.
Message digest – hash code.
Two octets of message digest – to enable the recipient to determine if the
correct public key was used to decrypt the message.
Key ID of sender’s public key – identifies the public key
Notation:
EkUb= encryption with user B‟s Public key
EKRa= encryption with user A‟s private key
EKs = encryption with session key
ZIP = Zip compression function
R64 = Radix- 64 conversion function
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 5 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
PGP provides a pair of data structures at each node, one to store the public/private key
pair owned by that node and one to store the public keys of the other users known at that node.
These data structures are referred to as private key ring and public key ring.
The general structures of the private and public key rings are shown below:
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 6 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 7 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
PGP retrieves the sender‟s private key from the private key ring using user ID as an
index. If user ID was not provided, the first private key from the ring is retrieved.
PGP prompts the user for the passphrase (password) to recover the unencrypted private
key.
The signature component of the message is constructed.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 8 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
PGP retrieves the receiver‟s private key from the private key ring, using the key ID field
in the session key component of the message as an index.
PGP prompts the user for the passphrase (password) to recover the unencrypted private
key.
PGP then recovers the session key and decrypts the message.
PGP retrieves the sender‟s public key from the public key ring, using the key ID field in
the signature key component of the message as an index.
PGP recovers the transmitted message digest.
PGP computes the message digest for the received message and compares it to the
transmitted message digest to authenticate.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 9 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
5.1.2. S/MIME
MIME is an extension to the RFC 822 framework that is intended to address some of the
problems and limitations of the use of SMTP (Simple Mail Transfer Protocol) or some other mail
transfer protocol and RFC 822 for electronic mail.
Following are the limitations of SMTP/822 scheme:
1. SMTP cannot transmit executable files or other binary objects.
2. SMTP cannot transmit text data that includes national language characters because
these are represented by 8-bit codes with values of 128 decimal or higher, and SMTP is limited
to 7-bit ASCII.
3. SMTP servers may reject mail message over a certain size.
4. SMTP gateways that translate between ASCII and the character code EBCDIC do not
use a consistent set of mappings, resulting in translation problems.
5. SMTP gateways to X.400 electronic mail networks cannot handle non textual data
included in X.400 messages.
6. Some SMTP implementations do not adhere completely to the SMTP standards
defined in RFC 821. Common problems include:
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 10 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
MIME is intended to resolve these problems in a manner that is compatible with existing
RFC 822 implementations. The specification is provided in RFCs 2045 through 2049.
5.1.3 OVERVIEW
The MIME specification includes the following elements:
1. Five new message header fields are defined, which may be included in an RFC 822
header. These fields provide information about the body of the message.
2. A number of content formats are defined, thus standardizing representations that
support multimedia electronic mail.
3. Transfer encodings are defined that enable the conversion of any content format into a
form that is protected from alteration by the mail system.
In this subsection, we introduce the five message header fields. The next two subsections deal
with content formats and transfer encodings.
The five header fields defined in MIME are as follows:
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.
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.
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).
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 11 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
For the text type of body, no special software is required to get the full meaning of the
text, aside from support of the indicated character set. The primary subtype is plain text, which
is simply a string of ASCII characters or ISO 8859 characters. The enriched subtype allows
greater formatting flexibility.
The multipart type indicates that the body contains multiple, independent parts. The
Content-Type header field includes a parameter, called boundary, that defines the delimiter
between body parts.
The multipart/digest subtype is used when each of the body parts is interpreted as an
RFC 822 message with headers. This subtype enables the construction of a message whose
parts are individual messages. For example, the moderator of a group might collect e-mail
messages from participants, bundle these messages, and send them out in one encapsulating
MIME message.
The message type provides a number of important capabilities in MIME. The
message/rfc822 subtype indicates that the body is an entire message, including header and
body. Despite the name of this subtype, the encapsulated message may be not only a simple
RFC 822 message, but also any MIME message.
The message/partial subtype enables fragmentation of a large message into a number
of parts, which must be reassembled at the destination. For this subtype, three parameters are
specified in the Content-Type: Message/Partial field: an id common to all fragments of the same
message, a sequence number unique to each fragment, and the total number of fragments.
The message/external-body subtype indicates that the actual data to be conveyed in
this message are not contained in the body. Instead, the body contains the information needed
to access the data.
5.1.3.2. MIME Transfer Encodings
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 12 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
quoted-printable Encodes the data in such a way that if the data being encoded
are mostly ASCII text, the encoded form of the data remains
largely recognizable by humans.
The quoted-printable transfer encoding is useful when the data consists largely of octets
that correspond to printable ASCII characters. In essence, it represents non safe characters by
the hexadecimal representation of their code and introduces reversible (soft) line breaks to limit
message lines to 76 characters.
The base64 transfer encoding, also known as radix-64 encoding, is a common one for
encoding arbitrary binary data in such a way as to be invulnerable to the processing by mail
transport programs.
Functions:
Table 1 summarizes the cryptographic algorithms used in S/MIME. S/MIME uses the
following terminology, taken from RFC 2119 to specify the requirement level:
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 13 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Should: There may exist valid reasons in particular circumstances to ignore this
feature or function, but it is recommended that an implementation include the feature
or function.
S/MIME makes use of a number of new MIME content types, which are shown in Table
2. All of the new application types use the designation PKCS. This refers to a set of public-key
cryptography specifications issued by RSA Laboratories and made available for the S/MIME
effort.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 14 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
1) Enveloped Data
2) Signed Data
The steps for preparing a signed Data MIME entity are as follows:
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 15 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
3) Clear Signing
Clear signing is achieved using the multipart content type with a signed subtype.
As was mentioned, this signing process does not involve transforming the message to
be signed, so that the message is sent "in the clear."
Thus, recipients with MIME capability but not S/MIME capability are able to read the
incoming message.
A multipart/signed message has two parts.
The first part can be any MIME type but must be prepared so that it will not be
altered during transfer from source to destination. This means that if the first part is not 7bit,
then it needs to be encoded using base64 or quoted-printable.
This second part has a MIME content type of application and a subtype of PKCS7-
signature The protocol parameter indicates that this is a two-part clear-signed entity. The
receiver can verify the signature by taking the message digest of the first part and comparing
this to the message digest recovered from the signature in the second part.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 16 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Key generation:
The user of some related administrative utility (e.g., one associated with LAN
management) MUST be capable of generating a key pair from a good source of
nondeterministic random input and be protected in a secure fashion.
Registration:
A user's public key must be registered with a certification authority in order to receive an
X.509 public-key certificate.
Certificate storage and retrieval:
A user requires access to a local list of certificates in order to verify incoming signatures
and to encrypt outgoing messages. Such a list could be maintained by the user or by some local
administrative entity on behalf of a number of users.
VeriSign Certificates
There are several companies that provide certification authority (CA) services. There are
a number of Internet-based CAs, including VeriSign, GTE, and the U.S. Postal Service.
VeriSign provides a CA service that is intended to be compatible with S/MIME and a
variety of other applications. VeriSign issues X.509 certificates with the product name VeriSign
Digital ID.
The information contained in a Digital ID depends on the type of Digital ID and its
use. At a minimum, each Digital ID contains
Owner's public key
Owner's name or alias
Expiration date of the Digital ID
Serial number of the Digital ID
Name of the certification authority that issued the Digital ID
Digital signature of the certification authority that issued the Digital ID
Address
E-mail address
Basic registration information (country, zip code, age, and gender)
VeriSign provides three levels, or classes, of security for public-key certificates. A user requests
a certificate online at VeriSign's Web site or other participating Web sites. Class 1 and Class 2
requests are processed on line, and in most cases take only a few seconds to approve. Briefly,
the following procedures are used:
For Class 1 Digital IDs, VeriSign confirms the user's e-mail address by sending a PIN
and Digital ID pick-up information to the e-mail address provided in the application.
For Class 2 Digital IDs, VeriSign verifies the information in the application through an
automated comparison with a consumer database in addition to performing all of the
checking associated with a Class 1 Digital ID.
o Finally, confirmation is sent to the specified postal address alerting the user that
a Digital ID has been issued in his or her name.
For Class 3 Digital IDs, VeriSign requires a higher level of identity assurance. An
individual must prove his or her identity by providing notarized credentials or applying in
person.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 17 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Signed receipts:
A signed receipt may be requested in a Signed Data object. Returning a signed receipt
provides proof of delivery to the originator of a message and allows the originator to
demonstrate to a third party that the recipient received the message.
Security labels:
The user can be relieved of this work by employing the services of an S/MIME Mail List
Agent (MLA). An MLA can take a single incoming message, perform the recipient-specific
encryption for each recipient, and forward the message.
The originator of a message need only send the message to the MLA, with encryption
performed using the MLA's public key.
Non-repudiation is the assurance that someone cannot deny something. Typically, non-
repudiation refers to the ability to ensure that a party to a contract or a communication cannot
deny the authenticity of their signature on a document or the sending of a message that they
originated.
To repudiate means to deny. On the Internet, a digital signature is used not only to
ensure that a message or document has been electronically signed by the person that purported
to sign the document, but also, since a digital signature can only be created by one person, to
ensure that a person cannot later deny that they furnished the signature.
Since no security technology is absolutely fool-proof, some experts warn that a digital
signature alone may not always guarantee non-repudiation. It is suggested that multiple
approaches be used, such as capturing unique biometric information and other data about the
sender or signer that collectively would be difficult to repudiate.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 18 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
5.2 IP SECURITY
IPSec provides the capability to secure communications across a LAN, across private
and public WANs, and across the Internet. Examples of its use include the following:
IPSec can play a vital role in the routing architecture required for internet working.
The following are examples of the use of IPSec. IPSec can assure that
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 19 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
5.2.2.2 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
IPSec provides security services at the IP layer by enabling a system to select required
security protocols, determine the algorithm(s) to use for the service(s), and put in place any
cryptographic keys required to provide the requested services.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 20 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Access control
Connectionless integrity
Data origin authentication
Rejection of replayed packets (a form of partial sequence integrity)
Confidentiality (encryption)
Limited traffic flow confidentiality
Security Associations
A key concept that appears in both the authentication and confidentiality mechanisms for
IP is the security association (SA). An association is a one-way relationship between a sender
and a receiver that affords security services to the traffic carried on it.
SA Parameters
A security association is normally defined by the following parameters:
a) Sequence Number Counter:
A 32-bit value used to generate the Sequence Number field in AH or ESP headers.
b) Sequence Counter Overflow:
A flag indicating whether overflow of the Sequence Number Counter should generate an
auditable event and prevent further transmission of packets on this SA.
c) Anti-Replay Window:
Used to determine whether an inbound AH or ESP packet is a replay.
d) AH Information:
Authentication algorithm, keys, key lifetimes, and related parameters being used with AH
(required for AH implementations).
e) ESP Information:
Encryption and authentication algorithm, keys, initialization values, key lifetimes, and
related parameters being used with ESP (required for ESP implementations).
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 21 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
A time interval or byte count after which an SA must be replaced with a new SA or
terminated, plus an indication of which of these actions should occur .
Transport Mode:
Transport mode provides protection primarily for upper-layer protocols. That is, transport
mode protection extends to the payload of an IP packet.
Tunnel Mode:
Tunnel mode provides protection to the entire IP packet. To achieve this, after the AH or
ESP fields are added to the IP packet, the entire packet plus security fields is treated as the
payload of new "outer" IP packet with a new outer IP header.
The entire original, or inner, packet travels through a "tunnel" from one point of an IP
network to another; no routers along the way are able to examine the inner IP header. Because
the original packet is encapsulated, the new, larger packet may have totally different source and
destination addresses, adding to the security.
The Authentication Header provides support for data integrity and authentication of IP
packets. The Authentication Header consists of the following fields:
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.
Reserved (16 bits): For future use.
Security Parameters Index (32 bits): Identifies a security association.
Sequence Number (32 bits): A monotonically increasing counter value.
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
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 22 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
The Authentication Data field holds a value referred to as the Integrity Check Value. The
ICV is a message authentication code or a truncated version of a code produced by a MAC
algorithm.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 23 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 24 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
By terminating the tunnels at the security gateway to each internal network, the
configuration allows the hosts to avoid implementing the security capability. The former
technique is support by a transport mode SA, while the latter technique uses a tunnel mode SA.
Transport Mode ESP:
For this mode using IPv4, the ESP header is inserted into the IP packet immediately
prior to the transport-layer header (e.g., TCP, UDP, ICMP) and an ESP trailer (Padding, Pad
Length, and Next Header fields) is placed after the IP packet; if authentication is selected, the
ESP Authentication Data field is added after the ESP trailer.
The entire transport-level segment plus the ESP trailer are encrypted. Authentication
covers all of the cipher text plus the ESP header.
For this mode using IPv4, the ESP header is inserted into the IP packet immediately
prior to the transport-layer header (e.g., TCP, UDP, ICMP) and an ESP trailer (Padding, Pad
Length, and Next Header fields) is placed after the IP packet; if authentication is selected, the
ESP Authentication Data field is added after the ESP trailer.
The entire transport-level segment plus the ESP trailer are encrypted. Authentication
covers all of the cipher text plus the ESP header.
Transport mode operation provides confidentiality for any application that uses it, thus
avoiding the need to implement confidentiality in every individual application. This mode of
operation is also reasonably efficient, adding little to the total length of the IP packet. One
drawback to this mode is that it is possible to do traffic analysis on the transmitted packets.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 25 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Tunnel mode ESP is used to encrypt an entire IP packet. For this mode, the ESP header
is prefixed to the packet and then the packet plus the ESP trailer is encrypted. This method can
be used to counter traffic analysis.
Because the IP header contains the destination address and possibly source routing
directives and hop-by-hop option information, it is not possible simply to transmit the encrypted
IP packet prefixed by the ESP header. Intermediate routers would be unable to process such a
packet.
Therefore, it is necessary to encapsulate the entire block (ESP header plus cipher text
plus Authentication Data, if present) with a new IP header that will contain sufficient information
for routing but not for traffic analysis.
This approach is illustrated in diagram. In this approach, the user first applies ESP to the
data to be protected and then appends the authentication data field. There are actually two
subcases:
Transport mode ESP: Authentication and encryption apply to the IP payload delivered
to the host, but the IP header is not protected.
Tunnel mode ESP: Authentication applies to the entire IP packet delivered to the outer
IP destination address (e.g., a firewall), and authentication is performed at that destination. The
entire inner IP packet is protected by the privacy mechanism for delivery to the inner IP
destination.
For both cases, authentication applies to the cipher text rather than the plaintext.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 26 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Transport Adjacency
Another way to apply authentication after encryption is to use two bundled transport
SAs, with the inner being an ESP SA and the outer being an AH SA. In this case, ESP is used
without its authentication option. Because the inner SA is a transport SA, encryption is applied
to the IP payload. The resulting packet consists of an IP header (and possibly IPv6 header
extensions) followed by an ESP.AH is then applied in transport mode,
so that authentication covers the ESP plus the original IP header (and extensions)
except for mutable fields. The advantage of this approach over simply using a single ESP SA
with the ESP authentication option is that the authentication covers more fields, including the
source and destination IP addresses.The disadvantage is the overhead of two SAs versus one
SA.
The lower part of each case in the figure represents the physical connectivity of the
elements; the upper part represents logical connectivity via one or more nested SAs. Each SA
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 27 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
can be either AH or ESP. For host-to-host SAs, the mode may be either transport or tunnel;
otherwise it must be tunnel mode.
Case 1: All security is provided between end systems that implement IPsec.
For any two end systems to communicate via an SA, they must share the appropriate
secret keys. Among the possible combinations are
AH in transport mode
ESP in transport mode
ESP followed by AH in transport mode (an ESP SA inside an AH SA)
Any one of a, b, or c inside an AH or ESP in tunnel mode
We have already discussed how these various combinations can be used to support
authentication, encryption, authentication before encryption, and authentication after encryption.
Case 2: Security is provided only between gateways (routers, firewalls, etc.) and no
hosts implement IPsec. This case illustrates simple virtual private network support. The security
architecture document specifies that only a single tunnel SA is needed for this case. The tunnel
could support AH, ESP, or ESP with the authentication option. Nested tunnels are not required,
because the IPsec services apply to the entire inner packet.
Case 3: This builds on case 2 by adding end-to-end security. The same combinations
discussed for cases 1 and 2 are allowed here. The gateway-to-gateway tunnel provides either
authentication, confidentiality, or both for all traffic between end systems.When the gateway-to-
gateway tunnel is ESP, it also provides a limited form of traffic confidentiality. Individual hosts
can implement any additional IPsec services required for given applications or given users by
means of end-to-end SAs.
Case 4: This provides support for a remote host that uses the Internet to reach an
organization‟s firewall and then to gain access to some server or workstation behind the firewall.
Only tunnel mode is required between the remote host and the firewall. As in case 1, one or two
SAs may be used between the remote host and the local host.
The key management portion of IPSec involves the determination and distribution of
secret keys. Two types of key management:
Manual: A system administrator manually configures each system with its own keys and
with the keys of other communicating systems. This is practical for small, relatively static
environments.
Automated: An automated system enables the on-demand creation of keys for SAs and
facilitates the use of keys in a large distributed system with an evolving configuration.
The default automated key management protocol for IPSec is referred to as
ISAKMP/Oakley and consists of the following elements:
Oakley Key Determination Protocol: Oakley is a key exchange protocol based on the
Diffie-Hellman algorithm but providing added security. Oakley is generic in that it does not
dictate specific formats.
Internet Security Association and Key Management Protocol (ISAKMP):ISAKMP
provides a framework for Internet key management and provides the specific protocol support,
including formats, for negotiation of security attributes.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 28 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 29 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Digital signatures
Public-key encryption
Symmetric-key encryption
5.2.4.3. ISAKMP
ISAKMP defines procedures and packet formats to establish, negotiate, modify, and
delete security associations.
ISAKMP Header Format
An ISAKMP message consists of an ISAKMP header followed by one or more payloads.
It consists of the following fields:
Initiator Cookie (64 bits): Cookie of entity that initiated SA establishment, SA
notification, or SA deletion.
Responder Cookie (64 bits): Cookie of responding entity; null in first message
from initiator.
Next Payload (8 bits): Indicates the type of the first payload in the message;
payloads are discussed in the next subsection.
Major Version (4 bits): Indicates major version of ISAKMP in use.
Minor Version (4 bits): Indicates minor version in use.
Exchange Type (8 bits): Indicates the type of exchange.
Flags (8 bits): Indicates specific options set for this ISAKMP exchange.
Message ID (32 bits): Unique ID for this message.
Length (32 bits): Length of total message (header plus all payloads) in octets.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 30 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
The World Wide Web is fundamentally a client/server application running over the
Internet and TCP/IP intranets.
Web Security Threats
Passive attacks include eavesdropping on network traffic between browser and server
and gaining access to information on a Web site that is supposed to be restricted.
Active attacks include impersonating another user, altering messages in transit
between client and server, and altering information on a Web site.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 31 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
IP
HTTP FTP SMTP
TCP
IP/IPSec
(c) Application
S/MIME PGP SET Level
Kerberos SMTP HTTP
Fig5.14: Relative UDP TCP Location of Security
Facilities in the TCP/IP IP Protocal Stack
Session:
An SSL session is an association between a client and a server. Sessions are created
by the Handshake Protocol. Sessions define a set of cryptographic security parameters, which
can be shared among multiple connections. Sessions are used to avoid the expensive
negotiation of new security parameters for each connection.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 32 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Session identifier
Peer certificate
Compression method
Cipher spec
Master secret
Is resumable
A connection state is defined by the following parameters:
Server and client random
Server write MAC secret
Client write MAC secret
Server write key
Client write key.
Initialization vectors
Sequence numbers
The SSL Record Protocol provides two services for SSL connections:
Confidentiality: The Handshake Protocol defines a shared secret key that is used for
conventional encryption of SSL payloads.
Message Integrity: The Handshake Protocol also defines a shared secret key that is
used to form a message authentication code (MAC).
The diagram indicates the overall operation of the SSL Record Protocol. The Record
Protocol takes an application message to be transmitted, fragments the data into manageable
blocks, optionally compresses the data, applies a MAC, encrypts, adds a header, and transmits
the resulting unit in a TCP segment. Received data are decrypted, verified, decompressed, and
reassembled and then delivered to higher-level users.
The first step is fragmentation. Each upper-layer message is fragmented into blocks of
214 bytes (16384 bytes) or less. Next, compression is optionally applied. Compression must be
lossless and may not increase the content length by more than 1024 bytes. In SSLv3 (as well as
the current version of TLS), no compression algorithm is specified, so the default compression
algorithm is null.
The next step in processing is to compute a message authentication code over the
compressed data.
The final step of SSL Record Protocol processing is to prepend a header, consisting of
the following fields:
Content Type (8 bits): The higher layer protocol used to process the enclosed
fragment.
Major Version (8 bits): Indicates major version of SSL in use. For SSLv3, the value is
3.
Minor Version (8 bits): Indicates minor version in use. For SSLv3, the value is 0.
Compressed Length (16 bits): The length in bytes of the plaintext fragment (or
compressed fragment if compression is used). The maximum value is 214 + 2048.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 33 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
This protocol consists of a single message which consists of a single byte with the value
1.
Alert Protocol
The Alert Protocol is used to convey SSL-related alerts to the peer entity.
Each message in this protocol consists of two bytes The first byte takes the value
warning(1) or fatal(2) to convey the severity of the message. The second byte contains a code
that indicates the specific alert.
unexpected_message: An inappropriate message was received.
bad_record_mac: An incorrect MAC was received.
decompression_failure: The decompression function received improper input (e.g.,
unable to decompress or decompress to greater than maximum allowable length).
handshake_failure: Sender was unable to negotiate an acceptable set of security
parameters given the options available.
illegal_parameter: A field in a handshake message was out of range or inconsistent
with other fields.
The remainder of the alerts is the following:
Close notify: Notifies the recipient that the sender will not send any more messages
on this connection. Each party is required to send a close_notify alert before closing
the right side of a connection.
No certificate: May be sent in response to a certificate request if no appropriate
certificate is available.
bad_certificate: A received certificate was corrupt (e.g., contained a signature that
did not verify).
unsupported_certificate: The type of the received certificate is not supported.
certificate_revoked: A certificate has been revoked by its signer.
certificate_expired: A certificate has expired.
certificate_unknown: Some other unspecified issue arose in processing the
certificate, rendering it unacceptable.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 34 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Handshake Protocol
This protocol allows the server and client to authenticate each other and to negotiate an
encryption and MAC algorithm and cryptographic keys to be used to protect data sent in an SSL
record. The Handshake Protocol is used before any application data is transmitted.
The Handshake Protocol consists of a series of messages exchanged by client and
server.
This phase is used to initiate a logical connection and to establish the security
capabilities that will be associated with it. The exchange is initiated by the client, which sends a
client_hello message with the following parameters:
If the server has requested a certificate, the client begins this phase by sending a
certificate message.Next is the client_key_exchange message, which must be sent in this
phase.
Finally, in this phase, the client may send a certificate_verify message to provide explicit
verification of a client certificate.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 35 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 36 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Finish
This phase completes the setting up of a secure connection. The client sends a
change_cipher_spec message and copies the pending CipherSpec into the current CipherSpec.
The client then immediately sends the finished message under the new algorithms, keys,
and secrets.
Cryptographic Computations
Master Secret Creation
The shared master secret is a one-time 48-byte value (384 bits) generated for this
session by means of secure key exchange. The creation is in two stages.
Diffie-Hellman: Both client and server generate a Diffie-Hellman public key. After these
are exchanged, each side performs the Diffie-Hellman calculation to create the shared
pre_master_secret.
SET is an open encryption and security specification designed to protect credit card
transactions on the Internet.
SET is not itself a payment system. Rather it is a set of security protocols and formats
that enables users to employ the existing credit card payment infrastructure on an open
network, such as the Internet, in a secure fashion.
SET provides three services:
Provides a secure communications channel among all parties involved in a
transaction
Provides trust by the use of X.509v3 digital certificates
Ensures privacy because the information is only available to parties in a
transaction when and where necessary
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 37 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Customer opens account: The customer obtains a credit card account, such as
MasterCard or Visa, with a bank that supports electronic payment and SET.
Customer receives a certificate: After verification the customer receives X.509V3,
digital certificate which is signed by the bank. This certificate verifies the customer‟s RSA
public key and expiration date.
Merchants have their own certificates:
Merchants who accepts card need to have 2 certificates for 2 public keys owned
by them.
One certificate is used for signing of message and the other is used for key
exchange.
The merchants also need the copy of payment gateway‟s public key certificate.
Customer places an order:
The customer places the order containing the list of items to be purchased to the
merchant.
The merchant returns the order form having the items, price, total price and order
number.
Merchant is verified: The merchant along with the order form sends its certificate
copy. The customer can verify the same.
Order and payment are sent:
The customer sends order and payment information into the merchant along with
customer‟s certificate.
This is order conformation of the order form.
The payment contains the card details. This is encrypted, so it cannot be read by
the merchant.
The certificate sent can be verified by the merchant.
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 38 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
The purpose of the dual signature is to link two messages that are intended for two
different recipients. In this case, the customer wants to send the order information (OI) to the
merchant and the payment information (PI) to the bank. The merchant does not need to know
the customer's credit card number, and the bank does not need to know the details of the
customer's order.
The customer takes the hash (using SHA-1) of the PI and the hash of the OI. These two
hashes are then concatenated and the hash of the result is taken. Finally, the customer
encrypts the final hash with his or her private signature key, creating the dual signature. The
operation can be summarized as
Where PRc is the customer's private signature key. Now suppose that the merchant is in
possession of the dual signature (DS), the OI, and the message digest for the PI (PIMD). The
merchant also has the public key of the customer, taken from the customer's certificate. Then
the merchant can compute the quantities
Where PUc is the customer's public signature key. If these two quantities are equal, then
the merchant has verified the signature.
Similarly, if the bank is in possession of DS, PI, the message digest for OI (OIMD), and
the customer's public key, then the bank can compute
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 39 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Purchase request
Payment authorization
Payment capture
Purchase Request
Before the Purchase Request exchange begins, the cardholder has completed browsing,
selecting, and ordering. The end of this preliminary phase occurs when the merchant sends a
completed order form to the customer.
The purchase request exchange consists of four messages: Initiate Request, Initiate
Response, Purchase Request, and Purchase Response.
verifies cardholder certificates using CA sigs
verifies dual signature using customer's public signature key to ensure order has
not been tampered with in transit & that it was signed using cardholder's private
signature key
processes order and forwards the payment information to the payment gateway
for authorization (described later)
sends a purchase response to cardholder
Payment Authorization
The payment authorization ensures that the transaction was approved by the issuer.
This authorization guarantees that the merchant will receive payment; the merchant can
therefore provide the services or goods to the customer. The payment authorization exchange
consists of two messages: Authorization Request and Authorization response.
Verifies all certificates
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 40 of 44
Downloaded from: annauniversityedu.blogspot.com
PANIMALAR ENGINEERING COLLEGE
www.edubuzz360.com
Decrypts digital envelope of authorization block to obtain symmetric key & then
decrypts authorization block
Verifies merchant's signature on authorization block
Decrypts digital envelope of payment block to obtain symmetric key & then decrypts
payment block
Verifies dual signature on payment block
Verifies that transaction ID received from merchant matches that in PI received
(indirectly) from customer
Requests & receives an authorization from issuer
Sends authorization response back to merchant
Payment Capture
To obtain payment, the merchant engages the payment gateway in a payment capture
transaction, consisting of a capture request and a capture response message.
Merchant sends payment gateway a payment capture request
Gateway checks request
Then causes funds to be transferred to merchants account
Notifies merchant using capture response
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Page 41 of 44
Downloaded from: annauniversityedu.blogspot.com
www.edubuzz360.com
PANIMALAR ENGINEERING COLLEGE
SYSTEM SECURITY:
Topic 1: Firewalls
Topic 2: Intruders
Topic 3: Malicious software
Topic 4: Viruses
https://play.google.com/store/apps/details?id=com.sss.edubuzz360
Downloaded from: annauniversityedu.blogspot.com
www.edubuzz360.com