Web Security Unit 6 Notes PDF
Web Security Unit 6 Notes PDF
net
Web Security
Usage of internet for transferring or retrieving the data has got many benefits like
speed, reliability, security etc. Much of the Internet's success and popularity lies in the fact
that it is an open global network. At the same time, the fact that it is open and global makes
it not very secure. The unique nature of the Internet makes exchanging information and
transacting business over it inherently dangerous. The faceless, voiceless, unknown entities
and individuals that share the Internet may or may not be who or what they profess to be.
In addition, because the Internet is a global network, it does not recognize national borders
and legal jurisdictions. As a result, the transacting parties may not be where they say they
are and may not be subject to the same laws or regulations.
For the exchange of information and for commerce to be secure on any network,
especially the Internet, a system or process must be put in place that satisfies requirements
for confidentiality, access control, authentication, integrity, and nonrepudiation. These
requirements are achieved on the Web through the use of encryption and by employing
digital signature technology. There are many examples on the Web of the practical
application of encryption. One of the most important is the SSL protocol.
A summary of types of security threats faced in using the Web is given below:
1
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
One way of grouping the security threats is in terms of passive and active attacks.
Passive attacks include eavesdropping on network traffic between browser and server and
gaining access to information on a website 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 website. Another way of classifying these security threats is in
terms of location of the threat: Web server, Web browser and network traffic between
browser and server.
Various approaches for providing Web Security are available, where they are similar
in the services they provide and also similar to some extent in the mechanisms they use.
They differ with respect to their scope of applicability and their relative location within the
TCP/IP protocol stack. The main approaches are IPSec, SSL or TLS and SET.
IPSec provides security at the network level and the main advantage is that it is transparent
to end users and applications. In addition, IPSec includes a filtering capability so that only
selected traffic can be processed. Secure Socket Layer or Transport Layer Security (SSL/TLS)
provides security just above the TCP at transport layer. Two implementation choices are
present here. Firstly, the SSL/TLS can be implemented as a part of TCP/IP protocol suite,
thereby being transparent to applications. Alternatively, SSL can be embedded in specific
packages like SSL being implemented by Netscape and Microsoft Explorer browsers. Secure
Electronic Transaction (SET) approach provides application-specific services i.e., according
to the security requirements of a particular application. The main advantage of this
approach is that service can be tailored to the specific needs of a given application.
2
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
SSL provides for secure communication between client and server by allowing
mutual authentication, the use of digital signatures for integrity and encryption for privacy.
SSL protocol has different versions such as SSLv2.0, SSLv3.0, where SSLv3.0 has an
advantage with the addition of support for certificate chain loading. SSL 3.0 is the basis for
the Transport Layer Security [TLS] protocol standard. SSL is designed to make use of TCP to
provide a reliable end-to-end secure service. SSL is not a single protocol, but rather two
layers of protocols as shown below:
The SSL Record Protocol provides basic security services to various higher-layer protocols. In
particular, the Hypertext Transfer Protocol (HTTP), which provides the transfer service for
Web client/server interaction, can operate on top of SSL. Three higher-layer protocols are
3
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
defined as part of SSL: the Handshake Protocol, The Change Cipher Spec Protocol, and the
Alert Protocol. Two important SSL concepts are the SSL session and the SSL connection,
which are defined in the specification as follows:
• Connection: A connection is a transport (in the OSI layering model definition) that
provides a suitable type of service. For SSL, such connections are peer-to-peer
relationships. The connections are transient. Every connection is associated with one
session.
• 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.
An SSL session is stateful. Once a session is established, there is a current operating state for
both read and write (i.e., receive and send). In addition, during the Handshake Protocol,
pending read and write states are created. Upon successful conclusion of the Handshake
Protocol, the pending states become the current states. An SSL session may include multiple
secure connections; in addition, parties may have multiple simultaneous sessions.
Session identifier: An arbitrary byte sequence chosen by the server to identify an active
or resumable session state.
Peer certificate: An X509.v3 certificate of the peer. This element of the state may be
null.
Compression method: The algorithm used to compress data prior to encryption.
Cipher spec: Specifies the bulk data encryption algorithm (such as null, AES, etc.) and a
hash algorithm (such as MD5 or SHA-1) used for MAC calculation. It also defines
cryptographic attributes such as the hash_size.
Master secret: 48-byte secret shared between the client and server.
Is resumable: A flag indicating whether the session can be used to initiate new
connections.
Server and client random: Byte sequences that are chosen by the server and client for
each connection.
Server write MAC secret: The secret key used in MAC operations on data sent by the
server.
Client write MAC secret: The secret key used in MAC operations on data sent by the
client.
Server write key: The conventional encryption key for data encrypted by the server and
decrypted by the client.
Client write key: The conventional encryption key for data encrypted by the client and
decrypted by the server.
Initialization vectors: When a block cipher in CBC mode is used, an initialization vector
(IV) is maintained for each key. This field is first initialized by the SSL Handshake
4
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
Protocol. Thereafter the final ciphertext block from each record is preserved for use as
the IV with the following record.
Sequence numbers: Each party maintains separate sequence numbers for transmitted
and received messages for each connection. When a party sends or receives a change
cipher spec message, the appropriate sequence number is set to zero. Sequence
numbers may not exceed 264-1.
• 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 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
overall operation of the SSL Record Protocol is shown below:
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. The next step in
processing is to compute a message authentication code over the compressed data. For this
purpose, a shared secret key is used. The calculation is defined as:
5
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
hash(MAC_write_secret || pad_2 ||
hash(MAC_write_secret || pad_1 || seq_num ||
SSLCompressed.type ||
SSLCompressed.length || SSLCompressed.fragment)) Where,
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.
The content types that have been defined are change_cipher_spec, alert, handshake, and
application_data.
6
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
The sole purpose of this message is to cause the pending state to be copied into the current
state, which updates the cipher suite to be used on this connection.
The first byte takes the value warning(1) or fatal(2) to convey the severity of the message. If
the level is fatal, SSL immediately terminates the connection. Other connections on the
same session may continue, but no new connections on this session may be established. The
second byte contains a code that indicates the specific alert. The fatal alerts are listed below
• 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
write side of a connection.
• no_certificate: May be sent in response to a certificate request if no appropriate
certificate is available.
7
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
• 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.
The Handshake Protocol consists of a series of messages exchanged by client and server. All
of these have the format shown below and each message has three fields:
The following figure shows the initial exchange needed to establish a logical connection
between client and server. The exchange can be viewed as having four phases.in phases
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:
8
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
• Session ID: A variable-length session identifier. A nonzero value indicates that the client
wishes to update the parameters of an existing connection or create a new connection
on this session. A zero value indicates that the client wishes to establish a new
connection on a new session.
• CipherSuite: This is a list that contains the combinations of cryptographic algorithms
supported by the client, in decreasing order of preference. Each element of the list (each
cipher suite) defines both a key exchange algorithm and a CipherSpec.
• Compression Method: This is a list of the compression methods the client supports.
9
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
After sending the client_hello message, the client waits for the server_hello
message, which contains the same parameters as the client_hello message. For the
server_hello message, the following conventions apply. The Version field contains the lower
of the version suggested by the client and the highest supported by the server. The Random
field is generated by the server and is independent of the client's Random field. If the
SessionID field of the client was nonzero, the same value is used by the server; otherwise
the server's SessionID field contains the value for a new session. The CipherSuite field
contains the single cipher suite selected by the server from those proposed by the client.
The Compression field contains the compression method selected by the server from those
proposed by the client. The first element of Cipher Suite parameter is key exchange method
and the selected methods are:
RSA: Secret key is encrypted with receivers RSA public key and a public key certificate
for the receiver’s key must be made available.
Fixed Diffie-Hellman: This method produces a fixed secret key between two peers based
on the Diffie- Hellman calculation using fixed public keys. Servers certificate contains the
D-H public parameters signed by CA and clients public key parameters are provided
either in a certificate or in a key exchange message.
Ephemeral Diffie- Hellman: Temporary, One-time secret keys are generated using D-H
scheme where public keys are exchanged signed using senders private RSA of DSS key.
Most secure as temporary, authenticated keys are generated
Anonymous Diffie- Hellman: The base D-H algorithm is used with no authentication. This
is vulnerable to man-in-the-middle attack.
Fortezza: the fortezza parameters are defined for both client and server
After the key exchange method, is the CipherSpec, which includes the following fields:
• CipherAlgorithm: Any of the algorithms: RC4, RC2, DES, 3DES, DES40, IDEA, Fortezza
• MACAlgorithm: MD5 or SHA-1
• CipherType: Stream or Block
• IsExportable: True or False
• HashSize: 0, 16 (for MD5), or 20 (for SHA-1) bytes
• Key Material: A sequence of bytes that contain data used in generating the write
keys
• IV Size: The size of the Initialization Value for Cipher Block Chaining (CBC) encryption
The server begins this phase by sending its certificate via a certificate message, which
contains one or a chain of X.509 certificates. The certificate message is required for any
agreed-on key exchange method except anonymous Diffie-Hellman. Next, a
server_key_exchange message may be sent if it is required. It is not required in two
instances: (1) The server has sent a certificate with fixed Diffie-Hellman parameters, or (2)
RSA key exchange is to be used. The server_key_exchange message is needed for the
following:
10
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
Anonymous Diffie-Hellman: The message content consists of the two global Diffie-
Hellman values (a prime number and a primitive root of that number) plus the server's
public Diffie-Hellman key.
Ephemeral Diffie-Hellman: The message content includes the three Diffie-Hellman
parameters provided for anonymous Diffie-Hellman, plus a signature of those
parameters.
RSA key exchange, in which the server is using RSA but has a signature-only RSA key: The
server creates a temporary RSA public/private key pair and use the
server_key_exchange message to send the public key. The message content includes the
two parameters of the temporary RSA public key (exponent and modulus) plus a
signature of those parameters.
Fortezza
Hash can be defined as hash(ClientHello.random || ServerHello.random || ServerParams),
where hash covers not only the Diffie-Hellman or RSA parameters, but also the two nonces
from the initial hello messages. This ensures against replay attacks and misrepresentation.
Once the server_done message is received by client, it should verify whether a valid
certificate is provided and check that the server_hello parameters are acceptable. If all is
satisfactory, the client sends one or more messages back to the server. If the server has
requested a certificate, the client begins this phase by sending a certificate message. If no
suitable certificate is available, the client sends a no_certificate alert instead. Next is the
client_key_exchange message, for which the content of the message depends on the type of
key exchange, as follows:
• RSA: The client generates a 48-byte pre-master secret and encrypts with the public key
from the server's certificate or temporary RSA key from a server_key_exchange
message.
• Ephemeral or Anonymous Diffie-Hellman: The client's public Diffie-Hellman parameters
are sent.
• Fixed Diffie-Hellman: The client's public Diffie-Hellman parameters were sent in a
certificate message, so the content of this message is null.
• Fortezza: The client's Fortezza parameters are sent.
11
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
Finally, in this phase, the client may send a certificate_verify message to provide explicit
verification of a client certificate. This message signs a hash code based on the preceding
messages, defined as follows:
CertificateVerify.signature.md5_hash
MD5(master_secret || pad_2 || MD5(handshake_messages ||
master_secret || pad_1));
Certificate.signature.sha_hash
SHA(master_secret || pad_2 || SHA(handshake_messages ||
master_secret || pad_1));
Phase 4. 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. The finished message verifies that the key exchange and
authentication processes were successful. The content of the finished message is the
concatenation of two hash values:
where Sender is a code that identifies that the sender is the client and handshake_messages
is all of the data from all handshake messages up to but not including this message. In
response to these two messages, the server sends its own change_cipher_spec message,
transfers the pending to the current CipherSpec, and sends its finished message. At this
point the handshake is complete and the client and server may begin to exchange
application layer data.
Cryptographic Computations
It includes, the creation of a shared master secret by means of the key exchange, and the
generation of cryptographic parameters from the master secret.
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. First, a pre_master_secret is
exchanged. Second, the master_secret is calculated by both parties. For pre_master_secret
exchange, there are two possibilities: First is RSA, where pre_master_secret is generated by
12
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
client, encrypted by servers public key and then decrypted by server to recover the
pre_master_secret. Second is Diffie Hellman, where the Server and Client exchange the
public key information and then calculate to create the pre_master_secret. Both sides now
compute the master_secret as follows:
where ClientHello.random and ServerHello.random are the two nonce values exchanged in
the initial hello messages.
CipherSpecs require a client write MAC secret, a server write MAC secret, a client write key,
a server write key, a client write IV, and a server write IV, which are generated from the
master secret in that order. These parameters are generated from the master secret by
hashing the master secret into a sequence of secure bytes of sufficient length for all needed
parameters. The generation of the key material from the master secret uses the same
format for generation of the master secret from the pre-master secret:
until enough output has been generated. The result of this algorithmic structure is a pseudorandom
function.
13
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
Version Number: The TLS Record Format is the same as that of the SSL Record Format and
the fields in the header have the same meanings. The one difference is in version values. For
the current version of TLS, the Major Version is 3 and the Minor Version is 1.
Message Authentication Code: Two differences arise one being the actual algorithm and
the other being scope of MAC calculation. TLS makes use of the HMAC algorithm defined in
RFC 2104. SSLv3 uses the same algorithm, except that the padding bytes are concatenated
with the secret key rather than being XORed with the secret key padded to the block length.
For TLS, the MAC calculation encompasses the fields indicated in the following expression:
The MAC calculation covers all of the fields covered by the SSLv3 calculation, plus the field
TLSCompressed.version, which is the version of the protocol being employed.
The data expansion function makes use of the HMAC algorithm, with either MD5 or SHA-1
as the underlying hash function. As can be seen, P_hash can be iterated as many times as
necessary to produce the required quantity of data. each iteration involves two executions
of HMAC, each of which in turn involves two executions of the underlying hash algorithm.
14
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
To make PRF as secure as possible, it uses two hash algorithms SHA-1 and MD5 on each half
of data and then taking a XOR to produce the output. It is defined as:
Alert Codes: TLS supports all of the alert codes defined in SSLv3 with the exception of
no_certificate. A number of additional codes are defined in TLS; of these, always fatal are
15
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
Cipher Suites: TLS supports all of the key exchange algorithms and also the symmetric
encryption algorithms found in SSLv3 with the exception of Fortezza scheme.
Client Certificate Types: TLS defines the following certificate types to be requested in a
certificate_request message: rsa_sign, dss_sign, rsa_fixed_dh, and dss_fixed_dh. These are
all defined in SSLv3 along with others. Once again Fortezza scheme is not included.
Cryptographic Computations: The pre_master_secret for TLS is calculated in the same way as
in SSLv3 and the calculation of master_secret is defined as:
The algorithm is performed until 48 bytes of pseudorandom output are produced. The
calculation of the key block material (MAC secret keys, session encryption keys, and IVs) is
defined as follows:
key_block = PRF(master_secret, "key expansion",
SecurityParameters.server_random ||
SecurityParameters.client_random)
until enough output has been generated.
Padding: In SSL, the padding added prior to encryption of user data is the minimum
amount required so that the total size of the data to be encrypted is a multiple of the
cipher's block length. In TLS, the padding can be any amount that results in a total that is a
multiple of the cipher's block length, up to a maximum of 255 bytes.
16
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
SET Requirements
• Confidentiality of information
• Integrity of data
• Cardholder account authentication
• Merchant authentication
SET Participants
Cardholder: purchasers interact with merchants from personal computers over the Internet
Merchant: a person or organization that has goods or services to sell to the cardholder
Issuer: a financial institution, such as a bank, that provides the cardholder with the payment
card.
Acquirer: a financial institution that establishes an account with a merchant and processes
payment card authorizations and payments
Payment gateway: a function operated by the acquirer or a designated third party that
processes merchant payment messages
Certification authority (CA): an entity that is trusted to issue X.509v3 public-key certificates
for cardholders, merchants, and payment gateways
17
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
Events in a transaction
1. The customer obtains a credit card account with a bank that supports electronic
payment and SET
2. The customer receives a X.509v3 digital certificate signed by the bank.
3. Merchants have their own certificates
4. The customer places an order
5. The merchant sends a copy of its certificate so that the customer can verify that it's a
valid store
6. The order and payment are sent
7. The merchant requests payment authorization
8. The merchant confirms the order
9. The merchant ships the goods or provides the service to the customer
10. The merchant requests payment
DUAL SIGNATURE
The purpose of the dual signature is to link two messages that are intended for two
different recipients. 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 is afforded extra protection in terms of privacy by keeping
these two items separate. The two items must be linked and the link is needed so that the
customer can prove that this payment is intended for this order and not for some other
goods or service.
18
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
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 DS = E [ H ( H ( PI ) || H(OI))]
KRc
where KRc 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 H(PIMS||H[OI]) and DKUc(DS) where KUc 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 H(H[OI]||OIMD)
and DKUc(DS). Again, if these two quantities are equal, then the bank has verified the
signature. To summarize:
For a merchant to substitute another OI, he has to find another OI whose hash exactly
matches OIMD, which is deemed impossible. So, the OI cannot be linked with another PI.
19
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
Purchase Request
Before the Purchase Request exchange begins, the cardholder has completed browsing,
selecting, and ordering. The purchase request exchange consists of four messages: Initiate
Request, Initiate Response, Purchase Request, and Purchase Response. The purchase
request exchange consists of four messages: Initiate Request, Initiate Response,
Purchase Request, and Purchase Response. In order to send SET messages to the
merchant, the cardholder must have a copy of the certificates of the merchant and the
payment gateway. The customer requests the certificates in the Initiate Request message,
sent to the merchant. It also includes, the brand of customers card, customer assigned ID
for the request/response pair and a nonce.
The merchant generates a response and signs it with its private signature key. The Initiate
Response message includes the merchant's signature certificate, the payment gateway's key
exchange certificate and a transaction ID along with the customer’s nonce and merchant’s
nonce. The cardholder verifies the merchant and gateway certificates by means of their
respective CA signatures and then creates the OI and PI. Next, the cardholder prepares the
Purchase Request message with Purchase-related information, Order-related information
and customers certificate as shown below:
20
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
2. Order-related information, needed by the merchant and consists of: OI, dual signature,
PI message digest (PIMD). OI is sent in the clear.
3. Cardholder certificate. This contains the cardholder’s public signature key. It is needed
by the merchant and payment gateway.
Merchant receives the Purchase Request message, the following actions are done:
The Purchase Response message includes a response block that acknowledges the
order and references the corresponding transaction number. This block is signed by the
merchant using its private signature key. The block and its signature are sent to the
customer, along with the merchant’s signature certificate. Necessary action will be taken
by cardholder’s software upon verification of the certificates and signature.
Payment Authorization
During the processing of an order from a cardholder, the merchant authorizes the
transaction with the payment gateway. The payment authorization ensures that the
transaction was approved by the issuer, guarantees the merchant will receive payment, so
merchant can provide services or goods to customer. The payment authorization exchange
consists of two messages: Authorization Request and Authorization response. The merchant
sends an Authorization Request message to the payment gateway consisting of the
following:
21
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
1. Purchase-related information. This information was obtained from the customer and
consists of PI, dual signature, OIMD and the digital envelope.
2. Authorization-related information. This information is generated by the merchant and
consists of an authorization block that includes the transaction ID, signed with the
merchant's private signature key and encrypted with a one-time symmetric key
generated by the merchant and a digital envelope. This is formed by encrypting the one-
time key with the payment gateway's public key-exchange key.
3. Certificates. The merchant includes the cardholder's signature key certificate (used to
verify the dual signature), the merchant's signature key certificate (used to verify the
merchant's signature), and the merchant's key-exchange certificate (needed in the
payment gateway's response).
The payment gateway performs the tasks below on receiving the Authorization Request
message.
Having obtained authorization from the issuer, the payment gateway returns an
Authorization Response message to the merchant. It includes the following elements:
With the authorization from gateway, the merchant provides the goods to the customer.
22
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
Payment Capture
To obtain payment, the merchant sends a capture request message to the payment
gateway, for which the merchant generates, signs, and encrypts a capture request block,
including payment amount and transaction ID. The payment gateway receives the capture
request message, decrypts and verifies the capture request block and decrypts and verifies
the capture token block. It then checks for consistency between the capture request and
capture token. It then creates a clearing request sent to the issuer over the private payment
network, which causes funds to be transferred to the merchant’s account. The gateway then
notifies the merchant of payment in a Capture Response message, which includes a capture
response block that the gateway signs and encrypts, plus the gateway’s signature key
certificate. The merchant software stores the capture response to be used for reconciliation
with payment received from the acquirer.
23
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com
www.jntuworld.com www.android.jntuworld.com www.jwjobs.net
Assignment Questions
1. Explain how the following threats to web security can be defended by SSL.(16)
(a) Known plaintext dictionary attack
(b) Replay attack
(c) Password sniffing
(d) SYN flooding.
2. (a) With a neat diagram explain SSL record protocol operation? (10)
(b) What is WWW? What are the challenges web presents? Discuss (6)
3. Describe how brute-force attack and man-in-the-middle attack can be counted by SSL (16)
5.(a) Discuss in detail the messages exchanged during the phase of handshake protocol used
to establish the security capabilities that are associated with it? (8)
(b) Explain how SSL record protocol provides basic security services to various higher layer
protocols? (8)
6.(a) What protocol is used to convey SSL-related alerts to the peer entity? Give the
protocol format? Describe the fields?
(b) What are the advantages of using IP security to provide web security? How
advantageous is application-specific web security services?
7.(a) Draw the diagrams showing the relative location of security facilities in TCP/IP protocol
stack? Discuss the advantages of each?
(b) What is SSL session? Can a session be shared among multiple connections? What are the
parameters that define a session state?
8.(a) List the sequence of events that are required for a secure electronic transaction? (8)
(b) Explain the concept of dual signature? (8)
24
Mukesh Chinta
Asst Prof, CSE,VNRVJIET
www.jntuworld.com