Question:
I want to find out from people who understand cryptography this is the question, because I am not very strong in such matters.
Suppose we have some initial data of 128 bits. I encrypt them with AES-256 with key1, and then re-encrypt the resulting cipher with the same AES-256, but for greater security with a different key2.
Does this mean that the resistance of encrypted information to hacking has become 2 times higher?
Answer:
Both keys do not have to be sorted out separately, since the " meet-in-the-middle " attack can be applied to double encryption.
A brief description is this. We have two texts – unencrypted (PT) and encrypted (CT). We begin to select keys using the brute force method. With each key, we encrypt the plaintext (we get PTX) and decrypt the ciphertext (we get CTX). We remember the results. We try the next key and so on. At each iteration, we check whether the resulting PTX matches one of the previously memorized CTX or the resulting CTX matches one of the previously memorized PTX. If a match is found, we have found both keys at once. Thus, to find two 256-bit keys by brute force, we need a maximum of 2 ^ 257 encryption / decryption operations, and not 2 ^ 512 at all.