Getting the plaintext from cipher text
Hello,
Can you get the plain text from it's cipher text if said plain text is encrypted with the plain text (plain text and key are the same), when using AES?
Many thanks.
Posted Oct 28, 2019, 8:23 PM UTC
Hello,
Can you get the plain text from it's cipher text if said plain text is encrypted with the plain text (plain text and key are the same), when using AES?
Many thanks.
Posted Oct 28, 2019, 8:23 PM UTC
So to start, AES is a block cipher so you likely need to talk about what mode of operation.
But the short answer is that as far as I've seen, there is no attack based off of particular or arbitrary plaintext-ciphertext combinations.
Thank you for your reply
I’ve never heard of any attack that would target a scenario like this, and I can’t find one online. However, I’m guessing that it’s an unlikely enough setup that nobody has really bothered to try. There at least doesn’t seem to be an obvious, trivial attack. But there’s no good reason to believe that it’s safe either. It’s definitely not “required” by any design goals that AES be secure when the plaintext equals the key.
Thanks.
In general the answer is that it might not be secure, though practically it is probably fine for most real ciphers such as AES. Here is a blog post which gives a brief overview of this topic.
Thank you.
This is an interesting question, and I'd say that in that case, it's mostly equivalent to AES with one less round.
The key (K) and the plaintext (P) being the same means that P + K = 0, where + is the XOR operation. Assuming you're familiar with how AES works, the encryption would go like this :
In the end, what remains is essentially the encryption of X with the key K1, but only over 9 rounds of AES (it's actually slightly more subtle than that since there are some round constants, but still).
I owuld not claim that it is completely equivalent, but it would be close enough to it to not caring about it.
No, not in general. However, just the fact that key = plaintext might suggest for example that the keyspace is significantly cut down, and might be in NSA-bruteforce range.
Cheers.