Encryption and file size

FWIW, some silly numbers...

As @ncw mentioned, there's no known plain text attack on a properly executed encryption. Further it's believed that symmetric encryption is quantum resistant. So someone wanting to decrypt data would have to do a brute force attack.

I'm gonna choose AES here, 'cos that gives really fast numbers 'cos of the AES-NI instruction set. On an Opteron chip it only takes around 30 cycles to do AES, so a 3Ghz clock would give 10^8 AES operations per second. Let's round up to a billion (10^9).

Let's also say we have a million cores all dedicated to this. That's 10^15 AES operations per second! Let's round up; 2^50 operations per second.

Now AES 256 has 256 bit keys. The best known attack on AES is Grover's algorithm which can reduce the problem space to the square root. So that means we've got 2^128 operations.

2^128/2^50 = 2^78. That's how many seconds it'd take these million cores to try and break the average AES256 encryption. That works out at 9,583,696,565,945,500 years.

Really it doesn't matter how many machines you throw at it; 10 million, 100 million, a million million cores... we're still in trillions of years.

No CSP is gonna do that.

Attacks on AES are generally attacks on the key generation process. And typically that may rely on a human entering a password into a key derivation function. If your password is "hello" then that's the attack point :slight_smile:

So I wouldn't worry about CSPs breaking the encryption on client side encrypted data. It's just not that important to them!

(This sort of logic is also why governments want to ban or backdoor end-to-end encryption chat systems like Signal or WhatsApp; you just can't brute force it, but if you design in a weakness then you don't need to!)

3 Likes