# Can files be 'over-encrypted'?

First a hypothetical situation:

Key1: Is a password (let's say "TooMuchEncryption") and then hashed with SHA256

Let's say you have 3 files, first you encrypt the files with AES256 with Key1 and then package them into a zip file. Then when you send it to a friend, you encrypt that whole zip file with the public key of your friend with PGP and you send it to him via a TCP channel.

Forget the time, because of course: this road would take a 'very' long time on a avarage computer (4 cores, 8 threads) (right?).

But it is secure. The chance anyone will decrypt those 3 files, is quite small (assuming they don't have those keys and they intercepted it by listening to the TCP channel).

But are these files 'over-encrypted'? Does it even make sense to apply so much encryption (first AES then PGP)? Would just zipping that file and protect that with Key1be enough?

With the current computers this would not take so much time. There is a high chance that reading / writing the files or sending the files over the network will take more time. If you've got trash like the McAfee virusscanner installed on either PC then that will take much more time as it will try and scan the files in the zip file at lower than 1 MiB/s.

Passwords are generally not very strong, while encryption using a hybrid cryptosystem such as PGP using an RSA public key is very strong. The password based encryption (PBE) is made worse as you're using SHA-256 instead of a password based key derivation function (or PBKDF). So an additional encryption would indeed not be a bad idea. In general you could do without the password encryption, but not without the PGP encryption the way you write it down. Note that the PGP encryption is also protecting the file names; it could be that the file names are sensitive too.

Even when using PGP you should check if you're not vulnerable against Bleichenbacher attacks, padding oracle attacks. This would mainly a problem if you automate the decryption when the files are received. Protection should also be in placed to disallow changes of the plaintext, for instance by signing the .zip file.

So I don't think you're over encrypting, rather the opposite. That said, performing encryption right once makes more sense than performing it badly twice.

• +1 for the last sentence. I'd much rather encrypt my disks with a single round of AES with the password "mrz4PGq4yq4P" than twice, once with "mrz4PG" and once with "q4yq4P"... – forest Nov 18 '18 at 8:04

PGP uses hybrid encryption, so it won't actually be particularly slow since it's encrypting the file with a symmetric key, and then encrypting the symmetric key with the recipient's public key.

There's no such thing as over-encryption. Sending an AES-encrypted file with PGP is fine.

There probably isn't a need for the first step (AES encrypting with Key1) but that depends on your use case. For example you might want to send encrypted data to a friend as a form of insurance to be revealable later only if the friend receives the key, but also keep anyone else from getting the ciphertext.