0
$\begingroup$

This question already has an answer here:

Assume AES in CBC mode is used to encrypt an arbitrary file. The key and the IV are generated out of secure random data and are both different for each file and of proper length and strength. Then the key the IV are encrypted with RSA. Now the AES encrypted file will be transmitted via an insecure transport from the sender to the recipient. The RSA encrypted key and iv are also transmitted via an insecure transport. The recipient now decrypt the IV and key via it RSA private key and then decrypt the file with the key and IV. So far so good and pretty common. Assume further that authentication is not necessary and GCM mode is out of scope here.

The question is now: Does it add "more security" (or will it even be "less secure") to "destroy" the encrypted AES file by flipping a bit (or two) of each AES block and store information about the flips alongside with the key and IV in the RSA encrypted part (so that the recipient can decrypt properly)?

Background of the question is the idea that an attacker, who "sees" the AES encrypted file, needs maybe more time and computing power to run a brute force attack because even when he has the right key and IV the decryption would fail because the blocks are all invalid?

Or is this "security by obscurity", useless, even dangerous or just another kind of "self invented encryption" (which is typically a bad idea)?

$\endgroup$

marked as duplicate by Gilles, kelalaka, Maeher, Maarten Bodewes encryption Jul 29 at 22:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0
$\begingroup$

Does it add "more security" [...] flipping a bit (or two) of each AES block and store information about the flips alongside with the key and IV in the RSA encrypted part (so that the recipient can decrypt properly)?

This would essentially be a stream cipher applied to the ciphertext, as a stream cipher encrypts by unpredictably deciding for each bit whether it should be flipped or not.

So this additional scheme can be seen as a custom stream cipher and will most likely add very little security beyond the existing encryption.

Background of the question is the idea that an attacker, who "sees" the AES encrypted file, needs maybe more time and computing power to run a brute force attack because even when he has the right key and IV the decryption would fail because the blocks are all invalid?

CBC has no notion of "invalid decryption" (beyond padding errors) and so the adversary would have to decide based on the "deciphered" contents whether the decryption was ok or not.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.