The Ultimate Guide of SSL
The Ultimate Guide of SSL
The Ultimate Guide of SSL
Why SSL?
There used to be a time when SSL Certificates were more like a luxury. But
in today’s digital world where cyber-attacks are more prevalent, securing a
website with an SSL/TLS Certificate has become more like a norm.
Websites and SSL Certificates go hand in hand: if there’s a website, it has
to have an SSL installed! Mainly because SSL/TLS Certificates help in
achieving the two main purposes of security – Encryption and
Authentication.
Few other reasons to have an SSL are; it helps to secure communication
that happens between the website and the customer’s web-browser,
communication on the corporate intranet, email communications sent
between the network or any private email address, transfer of information
between internal as well as external servers, information sent and received
between mobile devices.
Moreover, whenever someone enters any information, it goes through
multiple devices before reaching its destination, which can be checked
using a simple command prompt: command “tracert.”
For Windows Users:
1. Go to Start and Click on Run
2. Type “cmd” and hit Enter
3. Once the Command Prompt opens, type a website URL. For eg. tracert
domain-name.com
4. Hit Enter
You will now see a list of devices. Here, every “node” you see is a device
where your sent data gets recorded before reaching its destination.
Generally, 20 to 30 listings happen. This means your information has been
recorded on all those devices.
As we learn how SSL/TLS certificates are one of the essential parts of the
data encryption process to make internet transactions safe and secure,
let’s now learn how the SSL/TLS Certificate works.
As per a layman’s standpoint,
First, the server or browser tries to connect with an SSL secured
website (i.e., web server). The server or browser makes a request to
identify the web server.
The web server sends a copy of the SSL/TLS Certificate to the web
browser or server.
The web server or browser checks whether the SSL certificate is
trustworthy or not. If it is trustworthy, it sends a message to the web
server.
To start an SSL encrypted session, the web server sends back a
digitally signed acknowledgment.
Finally, the encrypted session begins and the encrypted data is
shared between the server/browser.
Also, the working of an SSL may look like a seamless process. But there
are several things working in the background that make the SSL
connection successful. For example, what are the different types of
encryption, how the authentication of the message is done, what ciphers &
algorithms are used and much more.
This is the very first step. Here the client initiates the h
1 ClientHello “ClientHello,” which recommends the parameters of S
entire SSL session.
Here, the server responds to the client with the messag
selected SSL parameters from the provided list that wi
2 ServerHello
the client and server fail to share common parameters,
right there.
Here, the Server will send the SSL Certificate chain (i
certificate) to the Client. Then, the Client will start che
legitimate by verifying the digital signature of the cert
3 Certificate checking if there’s any potential problem with the cert
expired, wrong domain name, etc.). The client will als
the private key of the certificate and this entire process
exchange/generation.
It’s an optional message, which is needed when certai
4 ServerKeyExchange
server to provide additional data.
Here, a part of the SSL negotiation are concluded by t
5 ServerHelloDone
message “ServerHelloDone” tells the Client that all th
Here, the client sends the information regarding the se
6 ClientKeyExchange
the server’s public key.
Step
Message Action
No.
Authentication
Authentication is one of the simplest terms of identity confirmation. It is one
of the processes used for network interactions and it also involves the
recognition of one party by the other. Moreover, there is more than one way
to use authentication over networks and certificates are one of those.
Network communications are generally done between two clients — for
example, a web browser and a server. Here, client authentication is the
identification of a client by a server and server authentication is the
identification of a server by a client. (For example, the client is the person
who is using a software/web browser and the server is the organization
running their server at the network address.)
Server and Client authentication are not limited to the form of
authentication supported by the certificates, but it also ensures
nonrepudiation. For example, an email message with the digital signature
combined with the certificate identifies and authenticates the sender of the
message and at the same time makes it difficult for the signer to tell that
the email is not sent by that person.
One thing to note is that Client authentication based on certificates are part
of the SSL protocol. Here, the client digitally signs a piece of data
generated randomly and sends that signed data as well as the certificate to
the network. Lastly, the server confirms the validity of the certificate after
validating the signature.
Below are the steps that explain how authentication of a Client by a Server
is done:
1. The client software manages a database which consists of private keys
corresponding to the public keys published in all the certificates issued for
that client. Here, the client asks for the password of the database to access
it for the first time for any given session. For example, the user attempting
to access an SSL-enabled server requires authentication for the certificate-
based client.
Note: Once the password is entered, it will not be asked again during the
whole session, even to access other SSL-enabled servers.
1. After that, the Client unlocks the database consisting of the private-key
and retrieves it for the user’s certificate and uses that private key for
signing data which is generated randomly from the input made by both the
server and the client. In return, the data and the digital signature work as
evidence that the private key is valid. Additionally, a digital signature is only
created with a private key and it’s validated with the corresponding public
key against the data which is signed and it stays unique to the SSL
session.
3. Randomly generated data as well as the user’s certificate, are both sent
across the network by the client
4. To authenticate the identity of the user, the server uses both the signed
data as well as the certificate.
5. The server may also perform other authentication tasks like checking
whether the certificate is stored in an LDAP directory in the user’s entry,
presented by the client. And once it is checked, it also evaluates whether
the identified user is allowed to access the requested resource.
Furthermore, the evaluation process may use other authorization
mechanisms, maybe company databases or information consisting of an
LDAP directory. If the result of the evaluation is positive, then the server will
allow the client to access the requested resources.
Here, the authentication part of the client and the server interaction is
replaced by the certificates. Rather than requesting the user to send
passwords through the network frequently, the single sign-on feature is
used. Here, the user enters the password of the private-key database for
the first time, without sending it through the network. Once it’s done for the
whole session, the user’s certificate is provided by the client to authenticate
every new server encountered by the user. Lastly, existing authorization is
not affected, which was founded on the authenticated user identity.
Encryption
Encryption is one of the essential applications of cryptography. It is used to
make data incomprehensible to ensure confidentiality. Also, encryption has
become an integral part of many products and services. It’s also widely
used over the internet by using modern encryption technologies such as
SSL/TLS.
By looking at the above image, it’s not hard to understand why PKI is
implemented through tree type hierarchies. The main benefit of PKI through
the hierarchy is that it allows the owner of the environment to control the
compromised event. It is also one of the reasons why device certificates
are not issued directly through the root CA but through a sub-CAs that are
below the root, because if something goes wrong, the entire PKI and all the
deployed devices of that field will need to be revoked.
Lastly, one of the main benefits is that a single sub-CA is capable and is
generating more than millions of device certificates used to authenticate
millions of devices with only one single public key of sub-CA.
TLS 1.3 made its major improvement by making changes in the Handshake
protocol. In TLS 1.2, it went through two round trips for the completion of
Handshake.
In TLS 1.3, it takes only one round-trip while making its connection site
faster. Because the negotiations taking place between the client and the
server have been reduced to two from four, Key exchanges and digital
signature scheme through extension are not required anymore. As
everything happens in milliseconds, it does not get noticed so quickly, but it
does make a difference.
Let’s see the TLS 1.3 protocol steps in detail. The significant difference is
that the TLS 1.3 handshake protocol involves one round trip compared to
TLS 1.2, which has three, eventually resulting in reduced latency.
Step
Message Action
No.
ClientHello
Supported
Here, it initiates with the message “ClientHello,” but the
Cipher Suites difference is that the client also sends the list of supported
1 cipher suites while guessing which key agreement protocol
Guessing of
will be selected by the server. Lastly, the client also sends
Key Agreement its key share regarding that agreement protocol.
Protocol
Key Share
ServerHello
Key Agreement The server replies with its chosen vital agreement protocol,
2 Protocol where “ServerHello” also includes the server’s key share
as its certificate and lastly “ServerFinished” message.
Key Share
Server Finished
Checks
Finally, the client verifies the server certificate, generates
Certificate its keys because of the server’s key share and sends the
3
message “Client Finished,” which means data encryption
Generate Keys can be started.
Client Finished
Moreover, TLS 1.3 went further and made its advancement to enable 0-
RTT handshake even before the client and server meet due to which it
takes zero round trips to do the handshake, resulting in the improvement of
latency.
You can say, it is more like a milestone, as due to accomplishing 0-RTT
Resumption, the client can connect with the server, even before TLS 1.3
permits a zero-round trip handshake. It is typically accomplished by storing
secret information such as Session ID or Session Tickets of previous
sessions and using them for future use whenever both parties connect.
Benefits of TLS 1.3 over TLS 1.2
TLS 1.2 provides some extensive improvements over TLS 1.2. Hence,
optional parts that caused the chances of vulnerability have been removed
and provided support for stronger ciphers, which is required to implement
Perfect Forward Secrecy (PFS) and other like short handshake process.
Security
Granted, it’s possible to deploy TLS 1.2 securely, but the optional parts of
the protocols and some outdated ciphers have been exploited by several
high-profile vulnerabilities. Here, TLS 1.3 helps by removing those
problematic options and provides support to algorithms which is not known
to any vulnerabilities till date.
The renegotiation attack is an example of such a threat which is not
possible in TLS 1.3.
Likewise, IETF has chosen to remove all ciphers which do not support PFS
(Perfect Forward Secrecy) from TLS connection such as AES-CBC, DES,
RC4 and some other less commonly used ciphers. IETF also removed the
capability of performing “renegotiation,” which allowed the client and server
to generate new keys, negotiate new parameters, etc. which is already
there with the TLS connection. Eventually, eliminating the chances of a
renegotiation attack.
Privacy
PFS is enabled by default in TLS 1.3. Due to this, an additional layer of
confidentiality is added to an encrypted session, which ensures that the
traffic can only be decrypted by the two endpoints. Additionally, even if
someone tries to record an encrypted session and later get access to the
private key of the server, PFS will not allow using that key for decrypting
the session.
Performance
As already discussed, with TLS 1.3, the entire round trip is eliminated from
the connection while establishing handshake, resulting in half encryption
latency. Additionally, it’s possible to send data to the server on the first
message itself, if you access a previously visited website, which is known
as 0-RTT (Zero Round Trip Time).
Now, in TLS 1.3, cipher suites do not include the key exchange and
signature algorithms. Now, it’s only bulk cipher and the hashing algorithm.
For example:
The cipher suites are registered and maintained in the TLS Cipher Suites
Registry by IANA, giving every cipher suite its unique number for
identification. So, the cipher suites defined for TLS 1.3 cannot be used with
TLS 1.2 and vice-versa, even if they use the same cipher suites.
Moreover, the defined encryption algorithm of the TLS 1.3 cipher suite must
be an AEAD (Authenticated Encryption with Additional Data) algorithm, as
it provides both confidentiality and message authentication in a single
crypto algorithm. Here, the main concept of the integrity and encryption
function has been changed with the AEAD algorithm.
Due to the introduction of AEAD and reduction of the supported cipher, it
will not be possible to send unencrypted data through TLS 1.3, which was
an option in a TLS 1.2 by using NULL encryption cipher suites.
Lastly, the recommended cipher suite list has also shrunk down
significantly.
TLS 1.2 Cipher Suite List:
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
TLS_DHE_RSA_WITH_AES_128_CBC_SHA
TLS_DHE_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
TLS 1.3 Cipher Suite List:
TLS_AES_256_GCM_SHA384
TLS_CHACHA20_POLY1305_SHA256
TLS_AES_128_GCM_SHA256
TLS_AES_128_CCM_8_SHA256
TLS_AES_128_CCM_SHA256
Trust Hierarchy
For certificates to be effective, their users must trust them. There have
been cases where users were not able to trust the issuer of a certificate.
For example, a user hearing about a certificate authority for the first time
and feels uncomfortable accepting a certificate from that issuer. So, it’s an
obvious question, how or who decides whether the CA is trustworthy.
Who decides whether a CA is Trustworthy?
Authorized CA ‘membership’ programs are operated by operating systems,
browsers and mobile devices, where the CA must meet the detailed criteria
for being a member. Once the CAs are accepted, they can issue SSL
Certificates that are trusted by browsers, devices and people relying on it.
However, there are a limited number of authorized CAs. Whether they are
private companies or government entities, the longer the CA is active, the
more the browsers and devices will trust the certificates issued by that CA.
Likewise, to be trusted, certificates must be able to provide backward
compatibility with older versions of browsers and specifically for mobile
devices. This is also known as ubiquity, one of the important features of a
CA. All these happen in a hierarchical manner, which is also known as
Trust Hierarchy of a CA.
Hierarchy of Trust
Browsers, operating systems, devices and even mobile carrier operate a
root store which is a database of all the approved CAs that comes pre-
installed in them. Also, CA is trusted if their Root Certificate is accepted by
that root store.
While issuing their Intermediate Root Certificates and End Entity Digital
Certificates, they use these pre-installed Root Certificates. The process
includes certificate request, further validating the applications, issuance of
the certificate and finally publishing the current validity status of that issued
certificate so that the user who relies on it can know that certificate is valid.
Generally, CAs create several Intermediate CA (ICA) Root Certificates that
are used to issue end-entity certificates, for example, SSL Certificates,
referred to as Trust Hierarchy and it looks like below:
Moreover, Digital Certificates are verified via a chain of trust which is a list
of certificates in an order. This contains End-Entity Certificate (Leaf
Certificate), Intermediate Certificate and Root Certificate, where the root
certificate authority (CA) is the trust anchor for the digital certificates.
A Single domain SSL/TLS Certificate protects only one specific domain. It’s
one of the most popular and commonly used certificates that protects the
www and non-www versions of the domain. It cannot be used for any other
domain as well as subdomains of the main one which is covered.
For example, a single domain SSL certificate can protect
www.My-New-Domain.com and My-New-Domain.com but it cannot protect
blog.My-New-Domain.com or mail.My-New-Domain.com
Multi-Domain/SAN SSL
Wildcard SSL is one of the most versatile SSL Certificates that can provide
encryption for an unlimited number of subdomains on one single certificate.
You’re allowed to add an unlimited number of subdomains later on, as long
as you’re reissuing your purchased certificate.
For example, a wildcard SSL certificate you purchase for www.My-New-
Domain.com, will allow you to secure its subdomains like the following.
mail.My-New-Domain.com
forum.My-New-Domain.com
blog.My-New-Domain.com
and many more
Moreover, EV Wildcard SSL/TLS Certificates are not available, so there’s
no other way around other than settling for an OV. If you’re looking to
encrypt sub-domains of multiple domains, then you will need to purchase
multiple Wildcards for those different domains.
Multi-Domain Wildcard SSL
It’s an FQDN (Fully Qualified Domain Name) of your server that must matc
Common Name exactly with the information you provided in your web browser or else you w
receive a name mismatch error.
Organization Unit The division or department of your organization that handles the certificate.
City/Locality The name of the city where the organization is located. Do not use abbreviat
State/Country/Region The state or region where your organization is located. Do not use abbreviat
Country The two-letter ISO code of the country where your organization is located.
Email Address An email address that is used for contacting your organization.
Public Key The public key which goes along with the certificate.
What Does a CSR Look Like?
Generally, a CSR is created in the PEM format encoded in Base-64 that
can be opened using a text editor such as Notepad. However, it’s a must to
include the header and footer lines “—–BEGIN CERTIFICATE REQUEST
—–” and “—–END CERTIFICATE REQUEST—–” at the beginning and the
end of the CSR.
Sample of a CSR
Furthermore, it is advisable to refer to CSR Generation guides, as
instructions differ from one server to another.
Though the OSCP checking process is more efficient for clients to check
the certificate’s revocation status, still it consists of certain issues such as:
As every client has to check the revocation status of every certificate,
the number of queries hitting the CA server (OCSP responders) will
get high.
As the OCSP responder has the log of IP addresses and the
websites visited by every client, it can create a privacy leak.
The entire process already gets slow because the client has to go
through another series of round trips for connecting and querying the
status of the certificate. If there’s a poor mobile network or any other
high latency connection, then the delay will be furthered more.
Additionally, the main issue of the revocation methods is that the client
handles all the burden. Every user and web browsing request must have
their query for the revocation service. OCSP stapling is another approach
to this.
OCSP Stapling
In OCSP Stapling, the burden of proof is moved from client to the ADC or
web server. For example, ADC periodically fetches the OSCP status for the
certificate it manages. And the OCSP responder result is digitally signed,
so if there’s any tampering, it may get spotted.
Here, the client has to make a single request to the web service. As the
ADC sends back the digitally signed status of the certificate, like the
certificate for the website it’s delivering is sent back. Moreover, OCSP
response is short-lived, and they are also approved by the CA, making
them trustworthy to clients.
Some of the things improved by OCSP Stapling are:
It removes the amount of time spent on page load by eliminating the
requests of the OCSP service
Fixes the privacy issue, as now the OCSP responder gets requests
only from one place, ADC or the webserver
Also cut downs the overhead on the OCSP responder, as it now only
serves infrequent requests of the webserver or ADC
Still, OCSP Stapling also has some issues like chances of active man-in-
the-middle (MITM) attacks like in OCSP. Also, OCSP stapling is not
mandatory but an option, as it’s possible to block the OCSP response and
trick the web browser into thinking that the malicious certificate is genuine.
Certificate Revocation in Browsers
Popular web browsers like Google Chrome and Mozilla Firefox have their
approach towards certificate revocations.
For example, Google Chrome does not use CRL lists or OCSP servers, but
they have their CRLset, which is the list of revoked certificates compiled
and embedded inside the Chrome browser. They are auto updated by
periodically crawling the CRLs of all the major CAs around the globe. And
Mozilla Firefox has an analogue solution known as OneCRL and also uses
the regular OCSP approach.
Firefox usually shows SEC_ERROR_REVOKED_CERTIFICATE error like
below, when the revoked status is encountered from OCSP responder:
Short and simple, avoid these certificates unless you’re using it for testing
purposes within an organization. A self-signed SSL Certificate will be
authenticated by you and not by a certificate authority. In other words, you
will be trying to make others believe you, “just because you said so” without
any legitimate proof, which is futile as no one will believe it.
In the same way, web-browsers will not accept it and will also warn your
website visitors by displaying a warning message saying, “The site’s
security certificate is not trusted!”, eventually preventing users from visiting
your website.
Choosing an Untrustworthy Certificate Authority
Some Certificate Authorities may not be trusted by web browsers. If you
have chosen to go with such Certificate Authorities, you will inevitably face
errors quite similar to that of the Self-Signed SSL/TLS Certificate Errors,
where web-browsers warn visitors whenever they try to visit your site. It’s
better to avoid SSL Certificates from such CAs and it’s even true to a
certain extent that all Certificate Authorities are not equal. The best way to
deal with such situations is to go with branded Certificate Authorities as
their security solutions and other trust indicators like site seals are more
recognized rather than going for something else just for the sake of saving
money.
Mistake in CSR (Certificate Signing Request)
Generating a Certificate Signing Request (CSR) is one of the crucial steps.
While installing an SSL certificate, it is mandatory to complete this step
without a single mistake. The CSR generation process differs depending on
the server you are using, so it’s better to thoroughly go through everything
to generate the CSR. You will not be able to install your SSL/TLS certificate
if you make mistakes or enter incorrect information. Apart from this, it’s also
recommended that you verify the CSR using tools such as CSR Decoder
once you finish it, as it will be helpful to know whether you should move to
another step or not.
Not Fully Prepared for the Validation Process
Validation is one of the mandatory steps. Before the SSL/TLS Certificate
gets issued to you, the Certificate Authority verifies you and your
organization. If it’s a Domain Validated SSL/TLS Certificate, it will only
verify the WHOIS registry information and you should respond through the
email registered with it. For the Organization Validated (OV) and Extended
Validated (EV) SSL/TLS Certificates, the process is a bit complex, as you
have to provide certain proofs for verification.
So, if anything goes wrong, for instance, if your organization does not have
a telephone number which is publicly listed, then there could be a delay in
the issuance of your SSL certificate and in the worst case, it may not get
issued at all.
Problems with Your Private Key
After completing the CSR creation process, an additional file named
‘Private Key’ will come along with it. This private key is an essential
element that helps in unblocking the encrypted communication transit
between your visitor’s web browser and your webserver. Losing or sharing
your private key might land your website in trouble, and you will have to
contact your CA to get it reissued. So, better safe than sorry!
Not Following the Installation Guide Properly
If you’re not an IT professional, it’s better to go through guides that can
help you install an SSL/TLS Certificate. Whether you purchase your
certificate from a reseller or a Certificate Authority, they do offer knowledge
base which consists of several guides and tutorials on SSL/TLS certificate
installation for different web servers.
Once You Encounter a Mistake, You Don’t Contact Customer
Support Service
You might already be aware of a certain mistake you made but you might
try to solve it on your own. It’s good to take matters into your hands, but if
you’re one of those inexperienced persons for whom SSL is quite new,
rather than taking risk, it would be better to contact Customer Support
Service. Certificate Authorities and SSL Certificate Providers offer chat,
email and telephone support. They even offer installation services at a
lower price. So, why not get done with it within a short period rather than
spending endless hours on errors about which you’re not aware of?
You Didn’t Check Once the Installation Is Over
Once the certificate is installed you might want to test it to make sure that
your time has not been wasted. It’s also recommended that you check
whether the SSL certificate is installed properly, because at times you may
assume that it has been installed properly and your site is secured and
trustworthy for your website visitors, but in reality, it may not be so. It’s
better you do a basic test by visiting your website through an HTTPS
protocol, for example, by typing “https://domain-name.com” in the address
bar to verify whether the padlock appears just to confirm it has been
properly done. You can also use certain tools like SSL Checker to get more
specific results.
You Forgot to Renew Your Certificate
The SSL/TLS Certificate you purchase and install comes with a specific
validity period of 1 or 2 years. Once it’s over, they expire. The main reason
to keep an expiry date is to keep the customers updated with the latest
evolving security standards by continually authenticating their identity.
In other words, it’s mandatory that you keep renewing the certificate to
enjoy the benefits of a secured website. But sometimes, it happens and
even big companies like LinkedIn, Yahoo and Google forgot to renew their
SSL Certificates, which made the websites temporarily unsecured. Popular
web-browsers such as Mozilla Firefox may even block such unsecured
websites. To avoid such situations, it’s better to remember SSL renewal
dates and renew it before it gets expired. SSL providers also send email
reminders, so don’t take it lightly.
2. Click on “Connection.”
3. Click on “More Information.”
4. “Page Info” will pop up, in that, click on “View Certificate.” To know more
details, click on “View Certificate.”
5. Once you click on “View Certificate,” a new window will pop-up which will
show more details of the installed SSL Certificate.
4. It will show you additional details like the Validity period and other
information.
How to view SSL/TLS Certificate Details in cPanel
It is quite easy to view SSL Certificate details in cPanel. It just takes a few
clicks and you’re done. Follow the below steps:
1. Login to cPanel