News for hackers. Stuff that matters.
Re:Architecting Websites for the HTTP/2 Era by richardwhiuk on Tuesday May 12, 2015 @02:06PM (#9533680)
It's quite depressing that we can't have both compression and encryption at the same time - text is very compressible - particularly HTML markup...
Re:Architecting Websites for the HTTP/2 Era by cesarb on Tuesday May 12, 2015 @03:20PM (#9534193)
Theoretically, you can, as long as any secrets within the response body are represented as a "literal" (that is, uncompressed) within the compressed stream.

In practice, there isn't a way I know of to mark the relevant parts of the response body so that the compression, which is usually done as a separate post-processing step, will know to avoid compressing these parts of the stream. And it would be very fragile; forgetting to mark a secret as "do not compress this" would work perfectly fine but reintroduce the vulnerability.

Re:Architecting Websites for the HTTP/2 Era by derefr on Tuesday May 12, 2015 @06:18PM (#9535363)
Simply enough in HTTP2: lift out the relevant parts of the response body—turn them into separate resources and refer to them in the original object by their URL. When the client then requests those dependent objects, deliver them uncompressed. (And server-hint/push the dependent objects if you can, of course.)
Re:Architecting Websites for the HTTP/2 Era by joeyespo on Wednesday May 13, 2015 @09:20AM (#9538643)
Could the order be reversed, encrypting first then compressing second?

So only compress when sending over the wire?

Re:Architecting Websites for the HTTP/2 Era by Wilya on Wednesday May 13, 2015 @11:13AM (#9539522)
You could, but you wouldn't compress much.

Encrypted data is supposed to look random, and as a consequence, it tends to compress very poorly.

Re:Architecting Websites for the HTTP/2 Era by joeyespo on Tuesday May 19, 2015 @09:32PM (#9574198)
Interesting. I was afraid that'd be the answer. Thanks for the reply.
Re:Architecting Websites for the HTTP/2 Era by tootie on Tuesday May 12, 2015 @04:06PM (#9534490)
You can with HTTP/2.