Module 5
Module 5
PGP
1. PGP stands for Pretty Good Privacy (PGP) which is invented by Phil Zimmermann.
2. PGP was designed to provide all four aspects of security, i.e., privacy, integrity,
authentication, and non-repudiation in the sending of email.
3. PGP uses a digital signature (a combination of hashing and public key encryption) to
provide integrity, authentication, and non-repudiation. PGP uses a combination of secret
key encryption and public key encryption to provide privacy. Therefore, we can say that
the digital signature uses one hash function, one secret key, and two private-public key
pairs.
4. PGP is an open source and freely available software package for email security.
5. PGP provides authentication through the use of Digital Signature.
6. It provides confidentiality through the use of symmetric block encryption.
7. It provides compression by using the ZIP algorithm, and EMAIL compatibility using the
radix-64 encoding scheme.
Following are the steps taken by PGP to create secure e-mail at the sender site:
Following are the steps taken to show how PGP uses hashing and a combination of three keys to
generate the original message:
1. The receiver receives the combination of encrypted secret key and message digest is
received.
2. The encrypted secret key is decrypted by using the receiver's private key to get the one-
time secret key.
3. The secret key is then used to decrypt the combination of message and digest.
4. 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.
5. Both the digests are compared if both of them are equal means that all the aspects of
security are preserved.
7. 1. Authentication
8. 2. Confidentiality
9. 3. Compression
10. 4. Email Compatibility
11. 5. Segmentation
PGP includes the following services which are as follows −
Authentication − The hash function used is SHA-1 which makes a 160 bit message digest. EP
(DP) defines public encryption (decryption) and the algorithm used can be RSA or DSS.
The set of SHA-1 and RSA supports an effective digital signature scheme. Because of the
strength of RSA the recipient is guaranteed that only the possessor of the connecting private key
can make the signature. Because of the strength of SHA-1 the recipient is guaranteed that no one
else can create a new message that connects the hash code and therefore the signature of the
original message.
Confidentiality − It is a service supported by PGP is confidentiality which is provided by
encrypting messages to be transmitted or to be saved locally as files. In some cases, the user has
a best of CAST-128, IDEA or 3DES in 64 bit cipher feedback (CFB) mode. The symmetric key
is used only once and is generated as a random number with the required number of bits. It is
acquired along with the message and is encrypted using the recipient’s public key.
1. The sender creates a message and a random number to be used as a session key for this
message only.
2. The message is encrypted utilizing CAST-128, IDEA or 3DES with the session key.
3. The session key is encrypted with RSA utilizing the recipient’s public key and is
prepended to the message.
4. The receiver uses RSA with its private key to decrypt and restore the session key.
5. The session key can be used to decrypt the message.
Confidentiality and Authentication − The both services can be used for the same message.
First, a signature is produced for the plaintext message and prepended to the message. Therefore
the plaintext message plus signature is encrypted using CAST-128 (or IDEA or 3DES), and the
session key is encrypted using RSA.
This sequence is desirable to the opposite encrypting the message and thus producing a
signature of the encrypted message. It is usually more convenient to save a signature with a
plaintext version of a message. Moreover, for the goals of third party verification, if the
signature is implemented first, a third party need not be concerned with the symmetric key when
testing the signature.
Compression − As a default, PGP restrict the message after using the signature but before
encryption. This has the advantage of storing space both for e-mail transmission and for file
storage.
E-mail compatibility − Some electronic mail systems only allows the use of blocks including
ASCII text. When PGP is used, minimum part of the block to be transmitted is encrypted.
6. Segmentation − E-mail facilities are restricted to a maximum message length. For
instance, some facilities accessible throughout the internet set a maximum length of
50,000 octets. Some message higher than that should be broken up into smaller segments,
each of which is mailed independently
S/MIME IP security
The S/MIME certificate's nitty-gritty will assist you in strengthening your critical security
concerns in the mail while also advancing your commercial goals. Continue reading to learn
more.
Over the last two decades, business and official interactions have shifted from phone
conversations to emails. Because email is the most used mode of communication, according to
Statista, 4.03 billion people will use email in 2021, and that number is expected to climb to 4.48
billion by 2024.
Every day, emails are sent and received across devices, necessitating the need to secure these
interactions. Because of the amount and type of sensitive data in a commercial firm, this
criticality is increased. Assume you work in a field where sensitive data is handled.
1. Intellectual property is something that belongs to you.
2. Personal information about employees
3. Customer information and contact information
4. Card information (credit and debit)
If this is the case, consider safeguarding your emails and safeguarding sensitive information.
Apart from preventing anyone from reading your emails, you must also protect your data from
fraudsters. These individuals are well-known for utilizing your email and concocting phishing
schemes to dupe people into handing over personal information.
An S/MIME certificate is an end-to-end encryption solution for MIME data, a.k.a. email
communications, as shown in the preceding sections. The use of asymmetric cryptography by
S/MIME certificates prevents the message's integrity from being compromised by a third party.
In basic English, a digital signature is used to hash the message. The mail is then encrypted to
protect the message's secrecy.
S/MIME employs public encryption to protect communications that can only be decoded with
the corresponding private key obtained by the authorized mail receiver, according to
GlobalSign, a company that provides specialized Public Key Infrastructure (PKI) solutions to
businesses.
Stepping back in time allows us to visualize the situation. Wax seals on letters served as a
unique identifying proof of the sender while also assisting the recipient in determining whether
the letters had been tampered with. S/MIME certificates work on a similar principle.
The sender can use a private key to digitally sign the letter he is sending. The email is then
accompanied by a public key while in transit. The recipient will use it to verify the sender's
digital signature and decode the message using his own private key. Using 'asymmetric
cryptography,' this system uses two separate but mathematically comparable cryptographic keys
to provide end-to-end encryption. The completely encrypted contents of the email will be nearly
hard to crack without both keys.
You receive a slew of cryptographic security features when you use an S/MIME certificate for
email apps.
1. Authentication − It refers to the verification of a computer user's or a website's identity.
2. Message consistency − This is a guarantee that the message's contents and data have not
been tampered with. The message's secrecy is crucial. The decryption procedure entails
checking the message's original contents and guaranteeing that they have not been altered.
3. Use of digital signatures that invoke non-repudiation − This is a circumstance in
which the original sender's identity and digital signatures are validated so that there is no
doubt about it.
4. Protection of personal information − A data breach cannot be caused by an
unintentional third party.
5. Encryption is used to protect data − It relates to the procedures described above, in
which data security is ensured by a mix of public and private keys representing
asymmetric cryptography.
The MIME type is designated by a S/MIME certificate. The enclosed data is referred to by the
MIME type. The MIME entity is completely prepared, encrypted, and packaged inside a digital
envelope.
Some of the most popular email programs that support S/MIME are listed below.
1. iPhone iOS Mail
2. Apple Mail
3. Gmail IBM Notes
4. Mozilla Thunderbird MailMate Microsoft Outlook or Outlook on the Web
5. CipherMail
Although an S/MIME certificate has been around for a long time and is supported by most email
clients, the disadvantages of using it include complicated implementation owing to the public
and private keys of the sender and receiver. As a result, it was restricted to highly classified
government communications and those started by techies.
The adoption trend has improved, thanks to the advent of automated solutions for deploying and
managing S/MIME certificates. The benefits of using S/MIME certificates to safeguard data in
transit and, at rest, have surpassed the disadvantages.
Secure email service providers are used by certain companies and individuals to send secure
emails. These services, such as ProtonMail, may allow you to send and receive private messages
for free, but the disadvantage is that both the sender and the recipient must have the same
account. This is a common disadvantage of endto-end encryption services.
Aside from this issue, there is a far more serious one that limits the usability of email services
for businesses. These ostensibly safe email service companies are nonetheless vulnerable to
cyber-attacks. VFEMail is a classic example of a secure email service provider that, after 20
years of operation, fell to a cyber-attack.
A method is to use a S/MIME certificate to digitally sign and send encrypted emails. This
technology is classified as secure public-key encryption by the Internet Engineering Task Force
(IETF), and it is also suggested by the National Institute of Standards and Technology (NIST) as
a "protocol for email end-to-end authentication and secrecy".
1. It is designed for processing the plain texts While it is designed to process email as well as many multimedia files.
3. PGP is good for personal as well as office use. While it is good for industrial use.
4. PGP is less efficient than S/MIME. While it is more efficient than PGP.
5. It depends on user key exchange. Whereas it relies on a hierarchically valid certificate for key exchange.
6. PGP is comparatively less convenient. While it is more convenient than PGP due to the secure transformation of all the applic
7. PGP contains 4096 public keys. While it contains only 1024 public keys.
8. PGP is the standard for strong encryption. While it is also the standard for strong encryption but has some drawbacks.
9. PGP is also be used in VPNs. While it is not used in VPNs, it is only used in email services.
10. PGP uses Diffie hellman digital signature. While it uses Elgamal digital signature.
IPSecurity Architecture
IPSec (IP Security) architecture uses two protocols to secure the traffic or data flow.
These protocols are ESP (Encapsulation Security Payload) and AH (Authentication
Header). IPSec Architecture includes protocols, algorithms, DOI, and Key Management.
All these components are very important in order to provide the three main services:
1. Confidentiality
2. Authentication
3. Integrity
IP Security Architecture:
Authentication Header
1. Transport mode
2. Tunnel mode
AH authenticates are the same as IP datagram. In transport mode, some fields in the IP header
change en-route and their value cannot be predicted by the receiver. These fields are called
mutable and they are not protected by AH.
Next header
It is an 8-bit field which identifies the type of what follows. The value of this field is chosen
from the set of IP header protocol fields, which is set to 51, and the value that would have gone
in the protocol field goes in the AH next header field.
Payload length
It is an 8 bits long field and contains the length of the AH header expressed in 32-bit words,
minus 2. It does not relate to the actual payload length of the IP packet. Suppose if default
options are used, the value is 4 (three 32-bit fixed words plus three 32-bit words of
authentication data minus two).
Reserved
It is reserved for future use. Its length is 16 bits and it is set to zero.
Sequence number
This 32-bit field is a monotonically increasing counter, which is used for replay protection. It is
an optional field. The sender always includes this field, and it is at the discretion of the receiver
to process it or not. Starting the sequence number is initialized to zero. The first packet
transmitted using the SA has a sequence number of 1. Sequence numbers are not allowed to
repeat.
Authentication data
This is a variable-length field containing the Integrity Check Value (ICV), and is padded to 32
bits for IPv4 or 64 bits for IPv6.
Encapsulating Security Payload (ESP) provides all encryption services in IPSec based on
integrity for the payload and not for the IP header, confidentiality and authentication that using
encryption, without authentication is strongly discouraged because it is insecure.
Any translations in readable message format into an unreadable format are encrypted and used
to hide the message content against data tampering.
IPSec provides an open framework, such as SHA and MD5 for implementing industry standard
algorithms.
Encryption/decryption allows only the sender and the authorised receiver to make the data to be
received in readable form and only after the integrity verification process is complete, the data
payload in the packet is decrypted.
IPSec uses a unique identifier for each packet, which is a data equivalent of a fingerprint and
checks for packets that are authorised or not. It doesn't sign the entire packet unless it is being
tunnelled—ordinarily, for this IP data payload is protected, not the IP header. In Tunnel Mode,
where the entire original IP packet is encapsulated with a new packet header added.
ESP in transport mode does not provide integrity and authentication for the entire IP packet.
ESP Format
The ESP format is diagrammatically represented as follows −
Explanation
Security Parameters Index (32 bits) − Identifies a security association. This field is
mandatory. The value of zero is reserved for local, implementation- specific use and MUST
NOT be sent on the wire.
Sequence Number (32 bits) − A monotonically increasing counter value; this provides an anti-
replay function, as discussed for AH. The first packet sent using a given SA will have a
Sequence number of 1.
Payload Data (variable) − This is a transport-level segment (transport mode) or IP packet
(tunnel mode) that is protected by encryption. The type of content that was protected is indicated
by the Next Header field.
Padding (0-255 bytes) − Padding for encryption, to extend the payload data to a size that fits
the encryption's cipher block size, and to align the next field.
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.
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. This field is optional and is included only if the authentication service
has been selected for the SA in question.
generate a security association within the Internet Protocol Security protocol suite. In this
article, we will discuss Internet Key Exchange in detail and explain why it is important
If your job title requires a certain degree of knowledge regarding cyber security and/or internet
security, you must have at least heard of the Internet Key Exchange. Abbreviated as IKE,
Internet Key Exchange is a specific protocol that aims to offer an additional layer of security to
the virtual private networks (also known as VPNs). In this article we will explain how Internet
Key Exchange works and how it can be beneficial for the cyber security posture of your
organization.
Simply put, the Internet Key Exchange is a hybrid protocol that is often used for key
exchanging encryption keys and/or authentication keys through an unsecured medium like the
Internet. In other words, the Internet Key Exchange aims to provide safe and secure encryption
The Internet Key Exchange dates back to the late 90s. It was defined by the Internet
Engineering Task Force (also known as the IETF) in November 1998. In IETF’s publications
titled Request for Comments, the purpose and scope of the Internet Key Exchange was
thoroughly explained (see RFC 2407, RFC 2408 and RFC 2409 for details). Later in December
2005, October 2006 and October 2014, these descriptions for the Internet Key Exchange were
updated and edited in accordance with the needs posed by new technologies.
The Internet Key Exchange protocol has its roots in the Oakley
Protocol, SKEME and ISAKMP, as a result it is often referred to as a hybrid protocol. The
Oakley Protocol strictly defines the mechanism for key exchange over a session of Internet Key
Exchange Protocol and sets the default key exchange algorithm as Diffie Hellman algorithm.
Internet Key Exchange offers numerous additional features and a certain degree of flexibility.
The Internet Key Exchange offers numerous additional benefits including flexibility. Below you
2. Through the use of Internet Key Exchange, the need for manual specification of all the IPSec
3. Internet Key Exchange allows certification authority, as a result it offers an additional layer of
security.
4. A specific lifetime can be set for IPsec security association when the Internet Key Exchange is
used.
5. Internet Key Exchange permits the dynamic authentication of peers.
Internet Key Exchange employs three different methods to ensure the peer authentication:
1. Authentication using RSA signatures
2. anti-replay services;
15.
16. The two approaches can be combined, for example, by having a transport SA betwee
n hosts travel part of the way through a tunnel SA between security gateways. One
interesting issue that arises when considering SA bundles is
the order in which authentication and encryption may be applied between a given pair of e
ndpoints and the ways of doing so. We examine that issue next. Then we look at combinati
ons of SAs that involve at least one tunnel.
17. Authentication Plus Confidentiality
18. Encryption and authentication can be combined in order to transmit an IP packet that has
both confidentiality and authentication between hosts. We look at several approaches.
19. ESP WITH AUTHENTICATION OPTION This approach is illustrated in Figure 19.8.
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:
20. • Transport mode ESP: Authentication and encryption apply to the IP p
ayload delivered to the host, but the IP header is not protected.
21. • 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.
22. For both cases, authentication applies to the ciphertext rather than the plaintext.
23. 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 th
at the authentication covers more fields, including the source and destination IP addresses.
The disadvantage is the overhead of two SAs versus one SA.
24. TRANSPORT-TUNNEL BUNDLE The use of authentication prior to encryption might
be preferable for several reasons. First, because the authentication data are protected by
encryption, it is impossible for anyone to intercept the message and
alter the authentication data without detection. Second, it may be desirable to store the au
thentication information
with the message at the destination for later reference. It is more convenient to do this if
the authentication information applies to the unencrypted message; otherwise the
message would have to be reencrypted to verify the authentication information.
25. One approach to applying authentication before encryption between two hosts is to use a
bundle consisting of an inner AH transport SA and an outer ESP tunnel SA. In this case,
authentication is applied to the IP payload plus the IP header (and extensions) except for
mutable fields. The resulting IP packet is then processed in tunnel mode by ESP; the
result is that the entire, authenticated inner packet is encrypted and a new outer IP header
(and extensions) is added.
26.
27. Basic Combinations of Security Associations
28. The IPsec Architecture document lists four examples of combinations of SAs that must
be supported by compliant IPsec hosts (e.g., workstation, server) or security
gateways (e.g. firewall, router). These are illustrated in Figure 19.10. The lower part
29.
30. 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 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.
31. 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 appropri-
ate secret keys. Among the possible combinations are
32. a. AH in transport mode
33. b. ESP in transport mode
34. c. ESP followed by AH in transport mode (an ESP SA inside an
AH SA)
35. d. Any one of a, b, or c inside an AH or ESP in tunnel mode
36. We have already discussed how these various combinations can be used to
support authentication, encryption, authentication before encryption, and authenti- cation
after encryption.
37. 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 authenti- cation
option. Nested tunnels are not required, because the IPsec services apply to the entire
inner packet.
38. Case 3. This builds on case 2 by adding end-to-end security. The same combi- nations
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 ser- vices required
for given applications or given users by means of end-to-end SAs.
39. Case 4. This provides support for a remote host that uses the Internet to reach an organizati
on’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.
40.
CASE STUDIES
n the last few decades, data privacy and security has become the primary concern to everyone.
Due to the rise in technological advancements and the internet, it has been a challenging task to
provide data security and data privacy of the data, when data is distributed over large
distributed networks. As everyone is now concerned with their data, a lot of research is going
on how to provide data security and privacy to the participants in the network. One of the
techniques which provide the solution to the problems of data security and data privacy
is Secure Multiparty Computation.
The secure multiparty computation may be defined as the problem of ‘n’ players to compute
jointly on an agreed function securely on the inputs without revealing them.
History
Secure multiparty computation started early in the 1970s. It was known as multiparty
computation at that time. It does not gain popularity at that time as it was not implemented
practically. In the 1982’s it was introduced as secure two-party multiparty computation. It is
used to solve a lot of problems of computation without revealing the inputs to other parties.
Finally, it came with a name as secure multiparty computation in which the functions of
different types are computed, that is the reason it is sometimes called SFE- Secure Function
Evaluation.
1. The secure multiparty computation is used for the utilization of data without compromising
privacy.
2. It is the cryptographic subfield that helps in preserving the privacy of the data.
3. Emerging technologies like blockchain, mobile computing, IoT, cloud computing has
resulted in the rebirth of secure multiparty computation.
4. Secure multiparty computation has become the hot area of research in the last decade due
to the rise of blockchain technology.
5. The researchers are now more interested to implement secure multiparty computation in
distributed systems.
6. Unlike in centralized systems, secure multiparty computation may have better performance
in distributed systems.
Architecture
The secure multiparty computation provides a protocol where no individual can see the other
parties data while distributing the data across multi parties. It enables the data scientists and
analysts to compute privately on the distributed data without exposing it.
Multiparty sharing data among each other with any third party using a specified protocol.
The co-workers want to compute the maximum salary without revealing their individual salary
to others. To perform such a computation, secure multiparty computation is implemented to
calculate the maximum salary. The parties in a distributed manner jointly perform a function to
calculate it without revealing the salary. Data in use is kept in encrypted form, broken up, and
distributed across parties, there are no chances of quantum attacks. It is impossible to have a
trusted party in the real world, as all parties communicate with each other in one or the other
way In such a scenario, the parties may get corrupted. The corrupted parties have behavior like
semi-honest and malicious.
1. A semi-honest opponent is one who follows the specified protocol but makes the parties
corrupted. The protocol is run honestly, but they try to extract information from the
messages exchanged between parties.
2. A malicious adversary makes an attempt to breach security and does not follow the
specified protocol. The adversary can make the changes during the execution process of the
protocol. While using multiparty computation, we assume the party is honest which
follows all the protocols.
Techniques
There are a number of techniques developed for secure multiparty computation protocol
construction having different features. Some techniques used in secure Multiparty computation
are listed below:
1. Shamir Secret Sharing: Secret sharing is utilized as the basic tool when there is an honest
majority in secure multiparty computation. A secret sharing scheme is that a secret s is
shared among n parties, such that t+1 or more parties come together to reconstruct the
secret. The parties lesser than t cannot get any information or reconstruct the secret. The
scheme which fulfills the requirements of t+1 out of n is called the threshold secret sharing
scheme.
2. Honest Majority MPC: The function can either be represented by Boolean or arithmetic
circuit in an honest majority. For MPC-based secret sharing having the honest majority,
there is finite field Zp with p>n for arithmetic circuit and the circuit is Turing complete.
3. Input sharing: Every party shares the input using the Shamir secret sharing. The circuit is
being provided the input for computation. Every party keeps his input private by adding
some random number to the input and finally, after getting the output the random number is
known to the party is removed, and we get the output.
4. Circuit evaluation: The circuit is evaluated by parties one gate at a time. The gates are
evaluated serially from input to output. The evaluation consists of the computation of
addition and multiplication gates. For inputs a(x) and b(x), the output of addition for the ith
party is calculated as c(i) = a(i) + b(i). Similarly, the output of multiplication for the ith
party is calculated as c(i) = a(i) . b(i).
5. Private set intersection: The private set intersection protocol is very efficient for the two
parties’ problems. Two parties who wish to find the elements of intersection with private
set of inputs without revealing the input, the private set intersection is better approach for
both honest and dishonest adversaries.
6. Threshold cryptography: Threshold cryptography aims to carry out the cryptographic
operations for a set of parties without holding the secret by any of the single party. RSA
algorithm is used for the scheme where the basic function is y=xe mod n. RSA is used for
encrypting secrets or messages.
7. Dishonest majority MPC: In the secure multiparty computation, there can be both honest
and dishonest parties. The secure Multiparty computation is secure as long as there is an
honest majority. If the adversaries are corrupt more than the majority, new approaches are
required for security. For the dishonest majority, there are protocols like GMW oblivious
transfer, garbled circuit, Tiny oz and many more protocols.
Secure multiparty computation being used for solving different problems, but there are few
limitations. The main limitations are the computational overhead and high communication
costs.
1. Computational overhead: To provide the security we need to generate the random
numbers, the random number generation requires more computation overhead which slows
down runtime.
2. High communication costs: Distributing the data to multiple parties for computation over
the networks leads to higher costs of communication.
VIRTUAL ELECTIONS
Before we get into the intricacies of voting and how it can use
cryptography, let’s go through some of the fundamental cryptographic
concepts involved.
Disadvantages of SSO :
1. Increased security risk if login credentials are not securely protected
and are exposed or stolen as adversaries can now access many
websites and applications with a single credential.
2. Authentication systems must have high availability as loss of
availability can lead to denial of service for applications using a
shared cluster of authentication systems.
Single sign-on (SSO) is a meeting and client validation administration (service) that
allows a client to utilize one lot of login certifications - for instance, a name and secret
key - to get to numerous applications.
SSO can be utilized by endeavours, littler associations, and people to facilitate the
administration of different usernames and passwords.
In an essential web SSO administration, an operator module on the application server
recovers the particular validation qualifications for an individual client from a committed
SSO arrangement server, while confirming the client against a client storehouse,
An example of SSO is a Lightweight Directory Access Protocol (LDAP) registry. The
administration confirms the end-client for all the applications the client has been offered
rights to and wipes out future secret phrase prompts for singular applications during a
similar meeting.
SSO Architecture
The architecture of SSO is explained below −
1. Single sign on architecture is an authentication mechanism which means using
the same set of credentials for multiple applications.
2. Users must be logged in the identity provider's application to use the single sign
on feature. Then the user can use it to sign in various applications that enable
this architecture.
3. When a user tries to access an application using SSO, the identity provider sends
a certificate to the application. This certificate ensures that the user is valid and
authenticated.
The SSO architecture is shown in the diagram below −
Advantages
The advantages of SSO are as follows −
1. No need for creating accounts for each and every application.
2. No need for creating password credentials for each and every application.
3. Users do not need to remember the user id and passwords of each and every
application.
4. It prevents keylogging attacks as the user does not need to enter a password.
Nowadays the security of the transactions are very important because these days most
of the things are happening online.
The transactions happen in the following forms −
1. When you go in a market and you use a POS for payment, then a transaction occurs.
2. In your mobile phone when you download an android app to order something like the
eBay app.
3. When you pay something through an online payment service like paypal.com.
Secure Transaction?
Generally a secure transaction happens in an encrypted form which happens between the site that
we are connected to and the browser that we are using. It happens through a file in which the
website provides its details, which we will deal further in the following sections. A simpler
indication is recognizing the difference between a secure and insecure connection of
which Https:// is a secured site, while Http:// is not secured.
If you or your users are using Google Chrome, you can push them to always connect securely, if
the webpage supports it. Always prefer the HTTPS extension, if you are using a Mozilla Firefox
there is an add-on called HTTPS Everywhere.
We should do a transaction only through webpages that we know or when they have a good
reputation. So, in simple words you should visit those webpages that you trust and even though
you trust, it is recommended to do the transactions through payment gateways like PayPal, so
you don’t transmit bank account details to third parties.
A good resource is www.mywot.com that gives you the rates of the websites and their reputation
based on millions of users, who trust their transaction to these websites.
At the end of the month always make a physical check of your transactions if they are matching
to your expenditure or not. If it is not, then it is recommended to block your payment carts or
accounts immediately.
After finishing the transactions, it is recommended that you always clear history, caches and
cookies. Especially if you are using another computer that is not yours.
What Should You do as a System Administrator?
As a system administrator, you should have in mind some rules that will help our customers to
make a secure transaction.
1. In the first place, you should check if there is any policy compliance for the system that
we are offering, like PCI, or HIPAA. Generally, these policies have security guidelines
too, like hardware or software that provides access controls, integrity controls, auditing
and transmission security.
2. Another thing is that a session should be limited based on time and IP. So when your
user signup form is getting the account open, the system will lock out after sometime and
find out if there is a possibility of any man-in-the-middle attack. The IP restriction should
not allow it.
3. Make a Usage Policy for your system, so the user knows their limit and gains knowledge
regarding the security.
4. Check if your system has the proper configuration for making a financial transaction. The
system should have a 2-factor authentication, where a passcode or a pin number is sent
to your client’s mobile phone every time an online transaction takes place and will only
be approved once you confirm the purchase by entering the code. This ensures that the
client is who he says he is by asking for something he knows, and something he has, like
a phone.
supports electronic payment transactions and the secure electronic transaction protocol.
Step 2: Customer Receive a Certificate
Once the customer identity is verified (Verification can be done by using a passport, business
(Certificate Authority). This certificate contains customer details like name, public key, expiry
trustworthiness.
the specific item according to requirements, and place the order. Once the customer places the
orders, the merchant, in return, sends the details of the order, such as a list of items selected, their
quantity and price, total bill, etc., to maintain a record of the order at the customer site.
the merchant. The order part is used to confirm the transaction with the reference of items that
are mentioned in the order form. The payment part contains the credit card( master card or visa)
details. This payment information is in encrypted form; even the merchant cannot read it. The
via the acquirer and requests the payment gateway to authorize the payment details. This process
ensures start the customer credit card is valid, and the credit limit is not breached.
the customer’s credit card with the help of the issuer. Based on the verification result, it either
payment gateway interacts with various financial organizations such as the issuer, acquirer and
the clearinghouse to effect the payment from the customer’s account to the merchant’s account.
Cross-site Scripting (XSS)
Cross-site Scripting (XSS) happens whenever an application takes untrusted data and
sends it to the client (browser) without validation. This allows attackers to execute
malicious scripts in the victim's browser which can result in user sessions hijack,
defacing web sites or redirect the user to malicious sites.
Let us understand Threat Agents, Attack Vectors, Security Weakness, Technical Impact
and Business Impacts of this flaw with the help of simple diagram.
Types of XSS
1. Stored XSS − Stored XSS also known as persistent XSS occurs when user input
is stored on the target server such as database/message forum/comment field
etc. Then the victim is able to retrieve the stored data from the web application.
2. Reflected XSS − Reflected XSS also known as non-persistent XSS occurs when
user input is immediately returned by a web application in an error
message/search result or the input provided by the user as part of the request
and without permanently storing the user provided data.
3. DOM Based XSS − DOM Based XSS is a form of XSS when the source of the
data is in the DOM, the sink is also in the DOM, and the data flow never leaves
the browser.
Example
The application uses untrusted data in the construction without validation. The special
characters ought to be escaped.
http://www.webpage.org/task/Rule1?query=try
The attacker modifies the query parameter in their browser to −
http://www.webpage.org/task/Rule1?query=<h3>Hello from XSS"</h3>
Hands ON
Step 1 − Login to Webgoat and navigate to cross-site scripting (XSS) Section. Let us
execute a Stored Cross-site Scripting (XSS) attack. Below is the snapshot of the
scenario.
Step 2 − As per the scenario, let us login as Tom with password 'tom' as mentioned in
the scenario itself. Click 'view profile' and get into edit mode. Since tom is the attacker,
let us inject Java script into those edit boxes.
<script>
alert("HACKED")
</script>
Step 3 − As soon as the update is over, tom receives an alert box with the message
"hacked" which means that the app is vulnerable.
Step 4 − Now as per the scenario, we need to login as jerry (HR) and check if jerry is
affected by the injected script.
Step 5 − After logging in as Jerry, select 'Tom' and click 'view profile' as shown below.
While viewing tom's profile from Jerry's account, he is able to get the same message
box.
Step 6 − This message box is just an example, but the actual attacker can perform
much more than just displaying a message box.
Preventive Mechanisms
1. Developers have to ensure that they escape all untrusted data based on the
HTML context such as body, attribute, JavaScript, CSS, or URL that the data is
placed into.
2. For those applications that need special characters as input, there should be
robust validation mechanisms in place before accepting them as valid inputs.