Difference between HTTP and HTTPS
Hypertext Transfer Protocol (HTTP) is an application layer protocol used in internet to access web applications. When you type any web address in your web browser, your browser acts as a client, and the computer having the requested information acts as a server. When client requests for any information from the server, it uses HTTP protocol to do so. The server responds back to the client after the request completes. The response comes in the form of web page which you see just after typing the web address and press “Enter”.
For example when we enter www.google.com in a browser the webpage request is sent over http protocol, Hence the URL of the web page would become http://www.google.com
Hypertext Transfer Protocol Secure (HTTPS) is a combination of two different protocols. It is more secure way to access the web. It is combination of Hypertext Transfer Protocol (HTTPS) and SSL/TLS protocol.
The web page communication is done through the typical HTTP Communication protocol and in addition to it the data that is sent over the network is encrypted using the SSL/TLS protocol. It is more secure way to sending request to server from a client, also the communication is purely encrypted which means no one can know what you are looking for. This kind of communication is used for accessing those websites where security is required. Banking websites, payment gateway, emails (Gmail offers HTTPS by default in Chrome browser), and corporate sector websites are some great examples where HTTPS protocols are used.
The HTTPS protocol has two important functionalities:
- When a web page request is made, the browser checks for response from the legitimate web server by validating the certificate of the web server. Any attempt to give an invalid or tampered certificate would lead to web browser showing a warning message to the user that the web site certificate is invalid
An example screenshot of certificate error is as follows:
The above screenshot is an example when the attacker tries to connect a proxy to the browser user is currently using, upon receiving such error it is always recommended to leave the browser and check configuration settings of the browser
- The data sent by the user is encrypted with the public key of the web page which is available in the web site certificate. HTTPS performs Asymmetric key/Public key encryption which means the plain text is encrypted to cipher text using the public key of the receiver and the cipher text would be decrypted to plain text with the private key which is known only to the receiver i.e; different keys are used for encryption and decryption.
HTTPS is required for all the web applications over HTTP because request/response exchange is done in plain text in HTTP, so it is possible for an attacker to perform man in the middle attack on a web application by sniffing the traffic of the user computer with a packet sniffer such as wireshark to gain access to the user credentials, session identifiers etc.
An example screenshot of user login credentials for a HTTP based web application is as follows
Apart from the major differences discussed above there are other differences described as follows:
HTTP
|
HTTPS
|
URL
begins with “http://”
|
URL
begins with “https://”
|
It
uses port 80 for communication
|
It
uses port 443 for communication
|
Unsecured
|
Secured
|
Operates
at Application Layer
|
Operates
at Transport Layer
|
No
encryption
|
Encryption
is present
|
No
certificates required
|
Certificates
required
|
Comments
Post a Comment