553
Order (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] bioemerl@kbin.social 1 points 1 year ago

The problem is that when you compress before you encrypt, the file size becomes a source of data about the contents. If an attacker has control of part of the data - say - a query string, they can use that to repeatedly add things to your data and see how the size changes as a result.

[-] bastian_5@sh.itjust.works 1 points 1 year ago

So it sounds like compression before encryption should only be done in specific circumstances because it can be a security issue depending on use case, but encryption before compression should never be done because it will almost always increase the size of the file

this post was submitted on 10 Aug 2023
553 points (97.9% liked)

Programmer Humor

19480 readers
219 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS