Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Securing parts of an HTTP request?

How does one go about securing parts of an HTTP request, say their Session ID? I know you can use HTTPS, but then your servers must decrypt all of the request. Wouldn't it be ideal to only encrypt the required parts of a request?

Are there any frameworks or resources out that that allow you or inform you how to do this?

like image 717
Brian DiCasa Avatar asked Nov 11 '10 00:11

Brian DiCasa


People also ask

What are the three parts of an HTTP request?

An HTTP request is made out of three components: request line, headers and message body.

Which HTTP request is secure?

HTTPS Secure: The HTTPS protocol is the Secure Hypertext Transfer Protocol, which is basically an Internet standard protocol for the encryption and confidentiality of the normal HTTP protocol on the Internet.


1 Answers

HTTPS is the correct tool to use. The computational load of decrypting the packets is very low. Google changed to HTTPS by default for the whole of GMail earlier this year, and they report that the CPU load on their servers for SSL encryption/decryption is around 1%.

If you only encrypt part of the stream then you still have the problem of man-in-the-middle and replay attacks. SSL is the only way to prevent these. It doesn't really matter if the session ID is encrypted. If a man-in-the-middle can capture it, he can reuse it in it's encrypted form, and the server wouldn't know the difference.

Here's a blog post about Google's experience since the GMail switch to 100% SSL.

like image 184
Andrew Cooper Avatar answered Oct 25 '22 17:10

Andrew Cooper