Given an encrypted file, the original unencrypted (cleartext) file, and knowledge of which AES encryption algorithm was used, is it possible to determine the key that was used to encrypt the data in a reasonable period of time?

I am not looking for details on how AES works, just a simple answer.


2 Answers 2


The simple answer is no, known plaintext attacks should not be possible on an AES-encrypted file, assuming that AES is applied correctly. No information about the encrypted file or key should be leaked even if the adversary can guesss the contents of "the original unencrypted (cleartext) file".

Beware that any mistake into a protocol specification or implementation may negate the security of AES - and this could include the security of the key used. Point in case: some "AES encrypted" USB devices stored the key next to the ciphertext, in case somebody forgot the password.

  • $\begingroup$ Got it. So all AES variants are resistant to known and chosen plaintext attacks? $\endgroup$
    – andrewgu
    Jul 18, 2015 at 0:14
  • 5
    $\begingroup$ As far as is publicly known. $\;$ $\endgroup$
    – user991
    Jul 18, 2015 at 1:01

No. That would amount to cracking AES, which is not feasible.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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