简体   繁体   中英

What is the difference between GET/POST in HTTP or HTTPS requests?

Is there any difference between how GET/POST works while in HTTP or HTTPS protocols? What is visible in HTTPS GET/POST packet when you try to sniff the data? host IP? domain name? full GET request? What information TLS hides after successful handshake?

I can't seem to close this knowledge gap by looking in the internet, there's just no such question asked.

Please advice, make it reference for the internet.

SSL operates between the TCP and HTTP protocol layers. The browser will first lookup the server ip via DNS. This is a plain text lookup that can be sniffed. It will then contact the server on port 443 and establish an encrypted channel. Only then will it send an encrypted POST or GET request URL for the server to fulfill.

  • IP addresses are not secured in any way.
  • Server name is exposed in the DNS lookup.
  • GET and POST URLs and server content responses are encrypted.
  1. URL begins with “http://" in case of HTTP while the URL begins with “https://” in case of HTTPS.
  2. HTTP is unsecured while HTTPS is secured.
  3. HTTP uses port 80 for communication while HTTPS uses port 443 for communication.
  4. HTTP operates at Application Layer while HTTPS operates at Transport Layer.
  5. No encryption is there in HTTP while HTTPS uses encryption.
  6. No certificates required in HTTP while certificates required in HTTPS.

The entire request , and the response as well is encrypted for https. A middle man doing a Man in the middle attack , can only get the destination host and port, by intercepting.

This Google Answer explains it properly. To quote

HTTPS Establishes an underlying SSL conenction before any HTTP data is transferred. This ensures that all URL data (with the exception of hostname, which is used to establish the connection) is carried solely within this encrypted connection and is protected from man-in-the-middle attacks in the same way any HTTP data is.

In terms of the TCP/IP stack, HTTP, an application layer protocol, uses TCP layer security. First , a secure TCP connection is established, then only the request is sent and response received.

I presume your confusion is not on http & https, but it is more on GET & POST http methods.

To make it clear, data is not encrypted neither in GET nor in POST. Go through this link which summarizes the differences between GET & POST.

As Sanjeev and Imran mentioned, data is encrypted in https whereas it is not in http protocol.

在此处输入图像描述 HTTP request is just section of text, generated by the user's browser, gets sent across the Internet. The problem is, it's sent just like this, in plaintext that anyone monitoring the connection can read. If a website uses HTTP instead of HTTPS, all requests and responses can be read by anyone who is monitoring the session. Essentially, a malicious actor can just read the text in the request or the response and know exactly what information someone is asking for, sending, or receiving.

In HTTPS requests and responses use TLS/SSL. TLS uses a technology called public key encryption: there are two keys, a public key and a private key, and the public key is shared with client devices via the server's SSL certificate. When a client opens a connection with a server, the two devices use the public and private key to agree on new keys, called session keys, to encrypt further communications between them.

All HTTP requests and responses are then encrypted with these session keys, so that anyone who intercepts communications can only see a random string of characters, not the plaintext.

Description is taken from here - quite easy and concise.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM