0% found this document useful (0 votes)
29 views41 pages

Unit - 3

Secure Socket Layer (SSL) provides encryption and authentication for data transferred between web browsers and servers. It uses protocols like SSL record protocol, handshake protocol, and alert protocol to encrypt the connection and establish trust. SSL ensures data privacy and integrity by encrypting data fragments, appending cryptographic signatures, and encrypting the entire message before transmission.

Uploaded by

Tamanna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views41 pages

Unit - 3

Secure Socket Layer (SSL) provides encryption and authentication for data transferred between web browsers and servers. It uses protocols like SSL record protocol, handshake protocol, and alert protocol to encrypt the connection and establish trust. SSL ensures data privacy and integrity by encrypting data fragments, appending cryptographic signatures, and encrypting the entire message before transmission.

Uploaded by

Tamanna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 41

Secure Socket Layer (SSL)

Secure Socket Layer (SSL) provides security to the data that is transferred
between web browser and server. SSL encrypts the link between a web
server and a browser which ensures that all data passed between them
remain private and free from attack.
Secure Socket Layer Protocols:
 SSL record protocol
 Handshake protocol
 Change-cipher spec protocol
 Alert protocol

SSL Protocol Stack:

SSL Record Protocol:


SSL Record provides two services to SSL connection.
 Confidentiality
 Message Integrity
In the SSL Record Protocol application data is divided into fragments. The
fragment is compressed and then encrypted MAC (Message Authentication
Code) generated by algorithms like SHA (Secure Hash Protocol) and MD5
(Message Digest) is appended. After that encryption of the data is done and
in last SSL header is appended to the data.

Handshake Protocol:
Handshake Protocol is used to establish sessions. This protocol allows the
client and server to authenticate each other by sending a series of messages
to each other. Handshake protocol uses four phases to complete its cycle.
 Phase-1: In Phase-1 both Client and Server send hello-packets to
each other. In this IP session, cipher suite and protocol version are
exchanged for security purposes.
 Phase-2: Server sends his certificate and Server-key-exchange.
The server end phase-2 by sending the Server-hello-end packet.
 Phase-3: In this phase, Client replies to the server by sending his
certificate and Client-exchange-key.
 Phase-4: In Phase-4 Change-cipher suite occurred and after this
Handshake Protocol ends.

SSL Handshake Protocol Phases diagrammatic representation

Change-cipher Protocol:

This protocol uses the SSL record protocol. Unless Handshake Protocol is
completed, the SSL record Output will be in a pending state. After the
handshake protocol, the Pending state is converted into the current state.
Change-cipher protocol consists of a single message which is 1 byte in
length and can have only one value. This protocol’s purpose is to cause the
pending state to be copied into the current state.

Alert Protocol:

This protocol is used to convey SSL-related alerts to the peer entity. Each
message in this protocol contains 2 bytes.

The level is further classified into two parts:

Warning (level = 1):


This Alert has no impact on the connection between sender and
receiver. Some of them are:
Bad certificate: When the received certificate is corrupt.
No certificate: When an appropriate certificate is not available.
Certificate expired: When a certificate has expired.
Certificate unknown: When some other unspecified issue arose in
processing the certificate, rendering it unacceptable.
Close notify: It notifies that the sender will no longer send any messages in
the connection.

Fatal Error (level = 2):


This Alert breaks the connection between sender and receiver. The
connection will be stopped, cannot be resumed but can be restarted. Some
of them are :
Handshake failure: When the sender is unable to negotiate an acceptable
set of security parameters given the options available.
Decompression failure: When the decompression function receives
improper input.
Illegal parameters: When a field is out of range or inconsistent with other
fields.
Bad record MAC: When an incorrect MAC was received.
Unexpected message: When an inappropriate message is received.
The second byte in the Alert protocol describes the error.

Silent Features of Secure Socket Layer:

 The advantage of this approach is that the service can be tailored


to the specific needs of the given application.
 Secure Socket Layer was originated by Netscape.
 SSL is designed to make use of TCP to provide reliable end-to-end
secure service.
 This is a two-layered protocol.

Cryptography and its Types


Cryptography is technique of securing information and communications
through use of codes so that only those person for whom the information is
intended can understand it and process it. Thus preventing unauthorized
access to information. The prefix “crypt” means “hidden” and suffix graphy
means “writing”.
In Cryptography the techniques which are use to protect information are
obtained from mathematical concepts and a set of rule based calculations
known as algorithms to convert messages in ways that make it hard to
decode it. These algorithms are used for cryptographic key generation,
digital signing, verification to protect data privacy, web browsing on internet
and to protect confidential transactions such as credit card and debit card
transactions.
Techniques used For Cryptography:
In today’s age of computers cryptography is often associated with the
process where an ordinary plain text is converted to cipher text which is the
text made such that intended receiver of the text can only decode it and
hence this process is known as encryption. The process of conversion of
cipher text to plain text this is known as decryption.
Features Of Cryptography are as follows:
1. Confidentiality:
Information can only be accessed by the person for whom it is
intended and no other person except him can access it.
2. Integrity:
Information cannot be modified in storage or transition between
sender and intended receiver without any addition to information
being detected.
3. Non-repudiation:
The creator/sender of information cannot deny his intention to send
information at later stage.
4. Authentication:
The identities of sender and receiver are confirmed. As well as
destination/origin of information is confirmed.
Types Of Cryptography:
In general there are three types Of cryptography:

1. Symmetric key cryptography – It involves the usage of one secret


key along with encryption and decryption algorithms which help in
securing the contents of the message. The strength of symmetric
key cryptography depends upon the number of key bits. It is
relatively faster than asymmetric key cryptography. There arises a
key distribution problem as the key has to be transferred from the
sender to the receiver through a secure channel.

2. Asymmetric key cryptography: It is also known as public-key


cryptography because it involves the usage of a public key along
with the secret key. It solves the problem of key distribution as both
parties use different keys for encryption/decryption. It is not feasible
to use for decrypting bulk messages as it is very slow compared to
symmetric key cryptography.

3. Hashing: It involves taking the plain text and converting it to a hash


value of fixed size by a hash function. This process ensures the
integrity of the message as the hash value on both, the sender’s
and receiver’s sides should match if the message is unaltered.
What is IPsec?
IPsec is a group of protocols that are used together to set up encrypted connections
between devices. It helps keep data sent over public networks secure. IPsec is often
used to set up VPNs, and it works by encrypting IP packets, along with authenticating
the source where the packets come from.
Within the term "IPsec," "IP" stands for "Internet Protocol" and "sec" for "secure." The
Internet Protocol is the main routing protocol used on the Internet; it designates
where data will go using IP addresses. IPsec is secure because it adds encryption*
and authentication to this process.
*Encryption is the process of concealing information by mathematically altering data
so that it appears random. In simpler terms, encryption is the use of a "secret code"
that only authorized parties can interpret.

What is a VPN? What is an IPsec VPN?


A virtual private network (VPN) is an encrypted connection between two or more
computers. VPN connections take place over public networks, but the data
exchanged over the VPN is still private because it is encrypted.
VPNs make it possible to securely access and exchange confidential data over shared
network infrastructure, such as the public Internet. For instance, when employees
are working remotely instead of in the office, they often use VPNs to access
corporate files and applications.
Many VPNs use the IPsec protocol suite to establish and run these encrypted
connections. However, not all VPNs use IPsec. Another protocol for VPNs is SSL/TLS,
which operates at a different layer in the OSI model than IPsec. (The OSI model is an
abstract representation of the processes that make the Internet work.)

How do users connect to an IPsec VPN?


Users can access an IPsec VPN by logging into a VPN application, or "client." This
typically requires the user to have installed the application on their device.
VPN logins are usually password-based. While data sent over a VPN is encrypted, if
user passwords are compromised, attackers can log into the VPN and steal this
encrypted data. Using two-factor authentication (2FA) can strengthen IPsec VPN
security, since stealing a password alone will no longer give an attacker access.

How does IPsec work?


IPsec connections include the following steps:
Key exchange: Keys are necessary for encryption; a key is a string of random
characters that can be used to "lock" (encrypt) and "unlock" (decrypt) messages.
IPsec sets up keys with a key exchange between the connected devices, so that each
device can decrypt the other device's messages.
Packet headers and trailers: All data that is sent over a network is broken down into
smaller pieces called packets. Packets contain both a payload, or the actual data
being sent, and headers, or information about that data so that computers receiving
the packets know what to do with them. IPsec adds several headers to data packets
containing authentication and encryption information. IPsec also adds trailers, which
go after each packet's payload instead of before.
Authentication: IPsec provides authentication for each packet, like a stamp of
authenticity on a collectible item. This ensures that packets are from a trusted source
and not an attacker.
Encryption: IPsec encrypts the payloads within each packet and each packet's IP
header (unless transport mode is used instead of tunnel mode — see below). This
keeps data sent over IPsec secure and private.
Transmission: Encrypted IPsec packets travel across one or more networks to their
destination using a transport protocol. At this stage, IPsec traffic differs from regular
IP traffic in that it most often uses UDP as its transport protocol, rather than TCP.
TCP, the Transmission Control Protocol, sets up dedicated connections between
devices and ensures that all packets arrive. UDP, the User Datagram Protocol, does
not set up these dedicated connections. IPsec uses UDP because this allows IPsec
packets to get through firewalls.
Decryption: At the other end of the communication, the packets are decrypted, and
applications (e.g. a browser) can now use the delivered data.

What protocols are used in IPsec?


In networking, a protocol is a specified way of formatting data so that any networked
computer can interpret the data. IPsec is not one protocol, but a suite of protocols.
The following protocols make up the IPsec suite:
Authentication Header (AH): The AH protocol ensures that data packets are from a
trusted source and that the data has not been tampered with, like a tamper-proof
seal on a consumer product. These headers do not provide any encryption; they do
not help conceal the data from attackers.
Encapsulating Security Protocol (ESP): ESP encrypts the IP header and the payload
for each packet — unless transport mode is used, in which case it only encrypts the
payload. ESP adds its own header and a trailer to each data packet.
Security Association (SA): SA refers to a number of protocols used for negotiating
encryption keys and algorithms. One of the most common SA protocols is Internet
Key Exchange (IKE).
Finally, while the Internet Protocol (IP) is not part of the IPsec suite, IPsec runs
directly on top of IP.

Introduction to DMVPN
DMVPN (Dynamic Multipoint VPN) is a routing technique we can use to build a VPN
network with multiple sites without having to statically configure all devices. It’s a
“hub and spoke” network where the spokes will be able to communicate with each
other directly without having to go through the hub. Encryption is supported
through IPsec which makes DMVPN a popular choice for connecting different sites
using regular Internet connections. It’s a great backup or alternative to private
networks like MPLS VPN. A popular alternative to DMVPN is FlexVPN.

There are four pieces to the DMVPN puzzle:

 Multipoint GRE (mGRE)


 NHRP (Next Hop Resolution Protocol)
 Routing (RIP, EIGRP, OSPF, BGP, etc.)
 IPsec (not required but recommended)
Let me explain these different topics…

Multipoint GRE

1. No tunnel destination
2. Uses tunnel source and tunnel mode (MGRE)
3. Tunnels can have many end points (using single tunnel interface).
4. The end points can be configured as point to point or multipoint.
5. Mapping is done by NHRP protocol.

Our “regular” GRE tunnels are point-to-point and don’t scale well. For example, let’s
say we have a company network with some sites that we want to connect to each
other using regular Internet connections:
Above we have one router that represents the HQ and there are four branch offices.
Let’s say that we have the following requirements:

 Each branch office has to be connected to the HQ.


 Traffic between Branch 1 and Branch 2 has to be tunneled directly.
 Traffic between Branch 3 and Branch 4 has to be tunneled directly.
To accomplish this we will have to configure a bunch of GRE tunnels which will look
like this:
Thing will get messy quickly…we have to create multiple tunnel interfaces, set the
source/destination IP addresses etc. It will work but it’s not a very scalable solution.
Multipoint GRE, as the name implies allows us to have multiple destinations.
When we use them, our picture could look like this:
When we use GRE Multipoint, there will be only one tunnel interface on each
router. The HQ for example has one tunnel with each branch office as its
destination. Now you might be wondering, what about the requirement where
branch office 1/2 and branch office 3/4 have a direct tunnel?

Right now we have a hub and spoke topology. The cool thing about DMVPN is that
we use multipoint GRE so we can have multiple destinations. When we need to
tunnel something between branch office 1/2 or 3/4, we automatically “build” new
tunnels:
When there is traffic between the branch offices, we can tunnel it directly instead of
sending it through the HQ router. This sounds pretty cool but it introduces some
problems…

When we configure point-to-point GRE tunnels we have to configure a source and


destination IP address that are used to build the GRE tunnel. When two branch
routers want to tunnel some traffic, how do they know what IP addresses to use?
Let me show you what I’m talking about:
Above we have our HQ and two branch routers, branch1 and branch2. Each router
is connected to the Internet and has a public IP address:

 HQ: 1.1.1.1
 Branch1: 2.2.2.2
 Branch2: 3.3.3.3
On the GRE multipoint tunnel interface we use a single subnet with the following
private IP addresses:

 HQ: 192.168.1.1
 Branch1: 192.168.1.2
 Branch2: 192.168.1.3
Let’s say that we want to send a ping from branch1’s tunnel interface to the tunnel
interface of branch2. Here’s what the GRE encapsulated IP packet will look like:
The “inner” source and destination IP addresses are known to use, these are the IP
address of the tunnel interfaces. We encapsulate this IP packet, put a GRE header in
front of it and then we have to fill in the “outer” source and destination IP addresses
so that this packet can be routed on the Internet. The branch1 router knows it’s own
public IP address but it has no clue what the public IP address of branch2 is…

To fix this problem, we need some help from another protocol…

NHRP (Next Hop Resolution Protocol)

We need something that helps our branch1 router figure out what the public IP
address is of the branch2 router, we do this with a protocol called NHRP (Next Hop
Resolution Protocol). Here’s an explanation of how NHRP works:

 One router will be the NHRP server.


 All other routers will be NHRP clients.
 NHRP clients register themselves with the NHRP server and report their
public IP address.
 The NHRP server keeps track of all public IP addresses in its cache.
 When one router wants to tunnel something to another router, it
will request the NHRP server for the public IP address of the other router.
Since NHRP uses this server and clients model, it makes sense to use a hub and
spoke topology for multipoint GRE. Our hub router will be the NHRP server and all
other routers will be the spokes.

Here’s an an illustration of how NHRP works with multipoint GRE:


Above we have two spoke routers (NHRP clients) which establish a tunnel to the hub
router. Later once we look at the configurations you will see that the destination IP
address of the hub router will be statically configured on the spoke routers. The
hub router will dynamically accept spoke routers. The routers will use a NHRP
registration request message to register their public IP addresses to the hub.
The hub, our NHRP server will create a mapping between the public IP addresses
and the IP addresses of the tunnel interfaces.
A few seconds later, spoke1 decides that it wants to send something to spoke2. It
needs to figure out the destination public IP address of spoke2 so it will send
a NHRP resolution request, asking the Hub router what the public IP address of
spoke 2 is.
The Hub router checks its cache, finds an entry for spoke 2 and sends the NHRP
resolution reply to spoke1 with the public IP address of spoke2.
Spoke1 now knows the destination public IP address of spoke2 and is able to tunnel
something directly. This is great, we only required the hub to figure out what the
public IP address is and all traffic can be sent from spoke to spoke directly.

In NHRP terminology , you’ll see that we don’t talk about “public IP addresses” but
NBMA addresses. NHRP is an old protocol (the RFC is from 1998) which was
originally developed for NBMA networks like frame-relay or ATM.

When we talk about DMVPN, we often refer to an underlay and overlay network:

 The underlay network is the network we use for connectivity between the
different routers, for example the Internet.
 The overlay network is our private network with GRE tunnels.
NHRP is a bit similar to ARP or frame-relay inverse ARP. Instead of mapping L2 to L3
information, we are now mapping a tunnel IP address to a NBMA IP address.
DMVPN has different versions which we call phases, there’s three of them:

 Phase 1
 Phase 2
 Phase 3
Let me give you an overview of the three phases:

Phase 1

With phase 1 we use NHRP so that spokes can register themselves with the hub. The
hub is the only router that is using a multipoint GRE interface, all spokes will be
using regular point-to-point GRE tunnel interfaces. This means that there will
be no direct spoke-to-spoke communication, all traffic has to go through the hub!

Since our traffic has to go through the hub, our routing configuration will be quite
simple. Spoke routers only need a summary or default route to the hub to reach
other spoke routers.

Phase 2

The disadvantage of phase 1 is that there is no direct spoke to spoke tunnels. In


phase 2, all spoke routers use multipoint GRE tunnels so we do have direct spoke
to spoke tunnelling. When a spoke router wants to reach another spoke, it will send
an NHRP resolution request to the hub to find the NBMA IP address of the other
spoke.

Problems with SSL Connection Error


Mean and How to Fix It

Did you know that more than one-third of today’s websites use an SSL certificate?
That’s a huge increase since just a couple of years ago, about 7% of websites
worldwide used SSL certificates.
However, most internet users have seen the “SSL connection error” displayed
when they try to access a website.
Sometimes this error might appear with a different message such as “Your
connection is not private.”
What’s the reason behind this error?
And what you can do, as a website owner, to fix this problem?

What Is SSL?
SSL stands for Secure Sockets Layer.
It is used to create a safe connection between the client and the server which
transmits data.
This information is encrypted using two keys – a private one and a public one.
The public key is available for everyone to read, but the private one is available
only for the recipient of the message.
When a website has an SSL badge, you’ll see “https://” in front of its domain
name, instead of the classic “http://”.
This means that your connection is more secure and any data you input into the
website is encrypted to prevent theft.
What Is A SSL Certificate?
An SSL Certificate is a method of ensuring the user that the information sent over
a website is safe and encrypted.
SSL certificates contain information about the domain of the website, the owner’s
address and other relevant information.
These certificates can be bought when someone starts a website and they help build
trust with internet users or customers.
Why Does The “SSL Connection Error” Appear?
The SSL connection error is quite common and it can be caused by multiple
factors.
Sometimes the problem is found on the server hosting the website, in other cases,
the problem might be found on the user’s end.
This error can appear for a couple of reasons such as:
 Having a browser problem
 An antivirus program or firewall might block access to a website
 The date and time of the computer trying to access the website is incorrect
 Having an untrusted SSL certificate
 The website might contain insecure information
 The SSL certificate might have wrong information
These are just a few of the reasons why the untrusted certificate error might appear.
You should also know that such errors might be temporary. You can be blocked
from viewing a website today, but tomorrow you’ll be able to visit it just fine.
This error is not necessarily specific to a website or browser either. You can find it
in both Google Chrome and Mozilla Firefox browsers.
Users report seeing this error in multiple websites such as Gmail, Google or even
Reddit.
How To Fix The SSL Connection Error
There are multiple solutions to this problem, depending on the reason why it
appears.

Let’s look at a few solutions to the SSL connection error.


#1 – Adjust The Time And Date
This is a common cause for the SSL problem and it can be fixed in just 1 minute.
Press your Windows key, press “R” and input “timedate.cpl”. This will open up the
settings for your computer’s time and date.
Make sure that the information displayed is correct and adjust if necessary. Click
on “Change Time Zone” and select the correct one if it doesn’t currently fit your
time zone.
Click “Ok” and visit the website again. The problem should be solved.
If the time and date are wrong each time you start your machine then there might
be a problem with the CMOS (Complementary Metal-Oxide-Semiconductor)
battery.

#2 – Tweak Your Browser


The SSL connection error might be caused by a browser problem. Here’s what you
can do to fix it:
Step 1 – Clear Browser History – press CTRL + SHIFT + DELETE at the same
time to open the settings of your current browser.
Look for browsing history and click on “Clear Browsing Data” or its equivalent.
Make sure that you also clear your browser cookies and cache.
Open the website again and see if the error is still displayed.
Step 2 – Update Your Browser – this is a simple and self-explanatory step. Open
up the settings in your current browser and look for the “Update Browser” button.
Sometimes the SSL error might be caused by an outdated browser and this single
step can fix that.
Step 3 – Use Incognito Tabs- every browser has a method of accessing the
internet anonymously.
Use an Incognito Tab to access the website in question and see if the error is still
there. For many users, this has been the solution to their SSL problem.
Step 4 – Reset Your Browser – this setting gets your browser back to its default
version.
Open up the settings page of your browser, click on “Advanced” and look for a
button called “Reset Browser” or its equivalent.
Reset your browser, restart it and access your website. If the error is still there, go
to the next step.
Step 5 – Use the Chrome Flag – this technique should be used at your own risk.
If none of the above methods worked, this can be a temporary solution to your SSL
problem. It works only for Google Chrome.
Right click on your Chrome icon and select “Properties”.
Look for the “Shortcut” tab. Next to the “Target:” text you should see a box where
you can type.
Write “\chrome.exe-ignore-certificate-errors” at the end of the text in that box.
Make sure that what you type is between quotes.
Click “Apply” and “Ok”. Visit your website and see if the error is still there or not.
What this method does is to make Google Chrome ignore security certificates
when navigating websites.
This might let you bypass the SSL connection error, but it will also make your
online presence more vulnerable to frauds, so use at your own risk.
Step 6 – Change Chrome Settings – downgrading the security level on Google
Chrome might fix the SSL error in some cases.
Go to Chrome settings, type “Network” and click on the “Change Proxy Settings”
button.
Go to the “Security” tab and drag the slider down until you see “Medium-high”
security. Click “Apply” and “Ok”.
Find the “Content” tab, click on the “Clear SSL State” button, click “Apply”, “Ok”
and restart your browser.
Hopefully, this would fix your SSL connection problem.
How To Fix SSL Errors in WordPress
If you’re a website owner and you frequently use WordPress, you might have seen
the SSL connection error already.
Here is how you can fix it:

#3 – Reinstall the SSL Certificate


If you bought an SSL certificate and manually installed it, you might get the error
when switching from “http://” to “https://”.
Try to reinstall the SSL certificate to solve this problem.
If your WordPress hosting provider installed the certificate for you, it is possible to
ask for their support with this issue. They might be able to reset the certificate and
fix the problem.

#4 – Fix Mixed Content Errors


A mixed content error might appear when some images or scripts still run using the
old “http://” protocol.
This can prevent your website from being fully secure and the SSL connection
error might appear.
To fix this problem, you need to install the “Really Simple SSL” plugin in
WordPress.
Once you have activated the plugin, go to Settings > SSL and to inspect the
settings. This tool functions automatically, taking care of the mixed content errors
quickly.

Scan Your System For Malware


Although it is quite rare to have malware causing the SSL problem, it is a good
idea to give this solution a try.

#5 – Eliminate Malware using Malwarebytes


Malwarebytes is a common program used to protect computers and scan for
viruses.
It can do a good job at eliminating common malware problems which might cause
the SSL error. Download this program, run a “Quick Scan” as well as a”Full
Scan”, restart your computer and see if this worked.
You can also scan for malware using other known antivirus programs such as
Avast Antivirus, Kaspersky or BitDefender.

#6 – Disable Antivirus/Firewall
In some cases, your own firewall or antivirus program might cause the SSL
problem.
This happens because the antivirus might mistakenly detect malware on your
website.
By deactivating your antivirus program or firewall for a while, you can fix this
problem. Make sure you also update the virus definitions and restart your computer
to see if this solved the SSL error.

#8 – Use System Restore


This method should be used only if nothing else worked and only if you’re
absolutely sure that the SSL problem might originate on your end, not on the
server.
To restore the system to a previous state, hit the “Windows” key, hit “R” and type
“rstrui”.
This will display a window to help you restore the system to a previous state.
Try to remember when was the last time you were able to access your website and
not get the nasty untrusted certificate error.
From the drop-down menu, choose a date before the one you think the error started
to appear. Click “Next” and let Windows work its magic.
How To Fix SSL Error On Android Phones
Multiple smartphones running Android might also display the SSL error.
You can try a few steps similar to the ones mentioned above to fix the problem.
For example, try updating your Chrome browser on your Android phone as well as
clearing browsing data and cookies.
You should also adjust the time and date to see if this fixed the problem.
Another option would be to change your Wi-Fi connection.

#8 – Use A Different Wi-Fi Connection


Public Wi-Fi networks are not to be trusted. They are insecure and might cause
frequent SSL problems.
What you should do is to switch to a private network and access your website
again. Does it work now?
You can also use your data plan and disable WI-Fi altogether for a while. Did this
solve the problem?

#9 – Reset Your Android Device


If absolutely nothing worked, not even disabling your antivirus program on
Android, then you might want to reset your device.
This is a “last resort” option. Make sure that you have your files and contacts
backed up before resetting your Android device.
You can find the “Reset” button somewhere in your smartphone’s setting panel. Its
equivalent would be “Restore to Factory Settings”.
Conclusion
Getting the SSL connection error is not the end of the world for your website.
Although it can be caused by various factors, there are numerous things you can try
to fix it.
To learn more about SSL and get one at an affordable price, check out our web
page on SSL certificates!
Group Encrypted Transport VPN (GETVPN)

Lesson Contents
 GETVPN Components
o Group Member
o Key Server
o GDOI
 IPSec
 Configuration
o Key Server
GETVPN (Group Encrypted Transport VPN) is a tunnel-less VPN technology meant
for private networks like MPLS VPN where we use a single SA (Security
Association) for all routers in a group.

Traditional IPSec has some scalability issues because it’s point-to-point. Take a look
at the following picture:
Each line represents an IPSec point-to-point tunnel. For each IPSec tunnel, the
router has an IPSec SA. For example, R1 has four tunnels so that’s four IPsec SAs.
With only a couple of routers this is no problem, but if you have a large topology
and you need a full mesh of IPSec tunnels, things can get hairy. There is a limit to
the number of IPSec SAs each router can have.

When you run IPSec on top of a hub and spoke topology like DMVPN then the hub
has an IPSec SA with each and every spoke router. This limits the number of spoke
routers you can have. DMVPN supports direct spoke-to-spoke traffic but when a
spoke wants to send traffic to another spoke, it first has to create a new IPSec SA
which takes time, causing delay.

Another issue with traditional IPSec is that you can’t encapsulate multicast traffic
unless you encapsulate it first with GRE.
GETVPN solves the scalability issue by using a single IPSec SA for all routers in a
group. It also supports multicast traffic without GRE. In this lesson, I’ll explain how
GETVPN works and I’ll show you how to configure it.

GETVPN Components

GETVPN has four main components:

 GM (Group Member)
 KS (Key Server)
 GDOI (Group Domain of Interpretation)
 IPSec
Let’s take a closer look at each component:

Group Member
The GM (Group Member) is a VPN router that is a member of the group
and encrypts traffic with other GMs. All GMs have the same IPSec SA so any GM
can encrypt traffic with any other GM right away.

Key Server
The KS (Key Server) is the “caretaker” of our group. They KS takes care of group
registration and authentication of GMs. Each GM that wants to join the group
registers with the KS and when authentication is successful, the KS sends the
encryption keys and the policy that we use for the group.

When a GM tries to register with the KS, the KS checks a group ID and IKE
credentials. When this checks out, the KS sends the following items to the GM:

 The security policy that we use for the group.


 Two keys:
o KEK (Key Encryption Key): this is used to encrypt rekey messages.
GMs use this key to decrypt rekey messages from the KS.
o TEK (Traffic Encryption Key): this becomes the IPSec SA that all GMs
use to encrypt traffic between each other.
The KS sends rekey messages when the current IPSec SA is about to expire or
when the security policy is changed. Rekeying can be done
through unicast or multicast. With unicast, each GM sends an acknowledgment to
the KS when it receives the new key. When the KS doesn’t receive an
acknowledgment after 3 transmissions, it deletes the GM. Multicast is a more
scalable method for rekeying but it doesn’t support acknowledgments.

The KS takes care of registration, authentication, the security policy, and the keys
but it’s not a GM. The KS does not become part of the group, it doesn’t install and
use the IPSec SA.

GDOI
GDOI is the protocol we use between the KS and GMs. It is protected with ISAKMP
phase 1, the same ISAKMP we use for regular IPSec. You can use all ISAKMP
authentication options like a pre-shared key or certificates. In phase 2, the KS sends
the two keys (KEK and TEK) and the security policy. The KS keeps track of the SA
lifetime and rekeys a new SA when it is about to expire. The rekey messages
are signed with a private key of the KS since anyone could pretend to be the KS.

GETVPN does not support volume-based SA expiry, only time-based SA expiry.


Volume-based is not practical since many GMs use the same SA.
IPSec

GETVPN uses ESP (Encapsulating Security Payload), the same as traditional IPSec
VPNs. It only supports tunnel mode which encapsulates the entire IP packet which
adds a new IP header. There is a twist however, GETVPN uses tunnel mode with
address preservation. This means it copies the inner IP header to the outer IP
header, without any changes. Here’s an example:

With traditional IPSec ESP tunnel mode, the outer header always has the IP
addresses of the VPN routers. Here’s an example:
The internal IP header shows traffic from different hosts on the network but the
outside IP header always shows the IP addresses of the VPN routers. Using tunnels
like this is known as overlay routing and one of the disadvantages is that these
packets probably always get routed the same way throughout our network since the
IP addresses never change.

Using tunnel mode with address preservation, the outer IP header has the IP
addresses of the inner IP header:

The advantage of copying the inner IP header to the outer IP header is that the
network can route packets based on the actual destination and find the best path to
each destination. One disadvantage, however, is that you can’t use address
preservation on the Internet since private IP addresses are unroutable. It’s
incompatible with NAT since NAT makes changes to the outer IP header.

GETVPN is meant for private networks, like MPLS VPN where you have full
reachability between all sites.

You might wonder, why don’t we just use IPSec transport mode instead of tunnel
mode? Transport mode uses the original IP header without copying so there is less
overhead. This is true but transport mode has some issues with fragmentation.
There is only one IP header so if you fragment the IP packet before IPSec and it gets
fragmented again during transit, you need an extra header to store the second
fragmentation. Because of this, they decided to use ESP tunnel mode with address
preservation for GETVPN.
Configuration

You now know the basics of GETVPN so let’s see if we can configure this. Here is the
topology I’ll use:

We have one key server and four group members. The cloud in the middle
represents a private WAN. OSPF is configured on the GM routers to advertise the
loopback interfaces.

Key Server
Let’s start with the KS, that’s where we need to configure most things. There are a
couple of items we need:

 IKE phase 1 policy: this is how the GMs authenticate with the KS.
 RSA key: used for rekeying to secure the re-key messages.
 IPSec policy: the policy that defines how we encrypt traffic.
 Access-list: the traffic that we want to encrypt.

Public Key Infrastructure


 Difficulty Level : Hard
 Last Updated : 09 Jun, 2022

 Read

 Discuss

Public key infrastructure or PKI is the governing body behind issuing digital
certificates. It helps to protect confidential data and gives unique identities to users
and systems. Thus, it ensures security in communications.
The public key infrastructure uses a pair of keys: the public key and the private key to
achieve security. The public keys are prone to attacks and thus an intact infrastructure
is needed to maintain them.

Managing Keys in the Cryptosystem:

The security of a cryptosystem relies on its keys. Thus, it is important that we have a
solid key management system in place. The 3 main areas of key management are as
follows:
 A cryptographic key is a piece of data that must be managed by secure
administration.
 It involves managing the key life cycle which is as follows:
 Public key management further requires:
 Keeping the private key secret: Only the owner of a private key
is authorized to use a private key. It should thus remain out of
reach of any other person.
 Assuring the public key: Public keys are in the open domain
and can be publicly accessed. When this extent of public
accessibility, it becomes hard to know if a key is correct and what
it will be used for. The purpose of a public key must be explicitly
defined.
PKI or public key infrastructure aims at achieving the assurance of public key.

Public Key Infrastructure:

Public key infrastructure affirms the usage of a public key. PKI identifies a public key
along with its purpose. It usually consists of the following components:
 A digital certificate also called a public key certificate
 Private Key tokens
 Registration authority
 Certification authority
 CMS or Certification management system

Working on a PKI:

Let us understand the working of PKI in steps.


 PKI and Encryption: The root of PKI involves the use
of cryptography and encryption techniques. Both symmetric and
asymmetric encryption uses a public key. The challenge here is – “how do
you know that the public key belongs to the right person or to the person
you think it belongs to?”. There is always a risk of MITM(Man in the
middle). This issue is resolved by a PKI using digital certificates. It gives
identities to keys in order to make the verification of owners easy and
accurate.
 Public Key Certificate or Digital Certificate: Digital certificates are
issued to people and electronic systems to uniquely identify them in the
digital world. Here are a few noteworthy things about a digital certificate.
Digital certificates are also called X.509 certificates. This is because they
are based on the ITU standard X.509.
 The Certification Authority (CA) stores the public key of a user
along with other information about the client in the digital
certificate. The information is signed and a digital signature is
also included in the certificate.
 The affirmation for the public key then thus be retrieved by
validating the signature using the public key of the Certification
Authority.
 Certifying Authorities: A CA issues and verifies certificates. This
authority makes sure that the information in a certificate is real and correct
and it also digitally signs the certificate. A CA or Certifying Authority
performs these basic roles:
 Generates the key pairs – This key pair generated by the CA can
be either independent or in collaboration with the client.
 Issuing of the digital certificates – When the client successfully
provides the right details about his identity, the CA issues a
certificate to the client. Then CA further signs this certificate
digitally so that no changes can be made to the information.
 Publishing of certificates – The CA publishes the certificates so
that the users can find them. They can do this by either publishing
them in an electronic telephone directory or by sending them out
to other people.
 Verification of certificate – CA gives a public key that helps in
verifying if the access attempt is authorized or not.
 Revocation – In case of suspicious behavior of a client or loss of
trust in them, the CA has the power to revoke the digital
certificate.

Classes of a Digital Certificate:

A digital certificate can be divided into four broad categories. These are :
 Class 1: These can be obtained by only providing the email address.
 Class 2: These need more personal information.
 Class 3: This first checks the identity of the person making a request.
 Class 4: They are used by organizations and governments.

Process of creation of certificate:

The creation of a certificate takes place as follows:


 Private and public keys are created.
 CA requests identifying attributes of the owner of a private key.
 Public key and attributes are encoded into a CSR or Certificate Signing
Request.
 Key owner signs that CSR to prove the possession of a private key.
 CA signs the certificate after validation.

Disadvantages of PKI:
 Speed: Since PKI uses super complex algorithms to create a secure key
pair. So it eventually slows down the process and data transfer.

 Private Key Compromise: Even though PKI can’t be hacked very easily
but a private key can be hacked by a professional hacker, since PKI uses
Public and Private key to encrypt and decrypt data so with user’s private
key in hand and public key which is easily available the information can be
decrypted easily.

Digital Signature
The Digital Signature is a technique which is used to validate the authenticity and
integrity of the message. We know that there are four aspects of security: privacy,
authentication, integrity, and non-repudiation. We have already discussed the first
aspect of security and other three aspects can be achieved by using a digital
signature.
The basic idea behind the Digital Signature is to sign a document. When we send a
document electronically, we can also sign it. We can sign a document in two ways: to
sign a whole document and to sign a digest.

Signing the Whole Document


o In Digital Signature, a public key encryption technique is used to sign a document.
However, the roles of a public key and private key are different here. The sender uses
a private key to encrypt the message while the receiver uses the public key of the
sender to decrypt the message.
o In Digital Signature, the private key is used for encryption while the public key is used
for decryption.
o Digital Signature cannot be achieved by using secret key encryption.

Digital Signature is used to achieve the following


three aspects:
o Integrity: The Digital Signature preserves the integrity of a message because, if any
malicious attack intercepts a message and partially or totally changes it, then the
decrypted message would be impossible.
o Authentication: We can use the following reasoning to show how the message is
authenticated. If an intruder (user X) sends a message pretending that it is coming
from someone else (user A), user X uses her own private key to encrypt the message.
The message is decrypted by using the public key of user A. Therefore this makes the
message unreadable. Encryption with X's private key and decryption with A's public
key results in garbage value.
o Non-Repudiation: Digital Signature also provides non-repudiation. If the sender
denies sending the message, then her private key corresponding to her public key is
tested on the plaintext. If the decrypted message is the same as the original message,
then we know that the sender has sent the message.
o Message digest -The representation of text in the form of a single
string of digits, created using a formula called a one-way hash
function. Encrypting a message digest with a private key creates a
digital signature which is an electronic means of authentication.
Signing the Digest
o Public key encryption is efficient if the message is short. If the message is long, a
public key encryption is inefficient to use. The solution to this problem is to let the
sender sign a digest of the document instead of the whole document.
o The sender creates a miniature version (digest) of the document and then signs it, the
receiver checks the signature of the miniature version.
o The hash function is used to create a digest of the message. The hash function
creates a fixed-size digest from the variable-length message.
o The two most common hash functions used: MD5 (Message Digest 5) and SHA-1
(Secure Hash Algorithm 1). The first one produces 120-bit digest while the second
one produces a 160-bit digest.
o A hash function must have two properties to ensure the success:
o First, the digest must be one way, i.e., the digest can only be created from the
message but not vice versa.
o Second, hashing is a one-to-one function, i.e., two messages should not
create the same digest.

Following are the steps taken to ensure security:


o The miniature version (digest) of the message is created by using a hash function.
o The digest is encrypted by using the sender's private key.
o After the digest is encrypted, then the encrypted digest is attached to the original
message and sent to the receiver.
o The receiver receives the original message and encrypted digest and separates the
two. The receiver implements the hash function on the original message to create the
second digest, and it also decrypts the received digest by using the public key of the
sender. If both the digests are same, then all the aspects of security are preserved.
At the Sender site

You might also like