I use OpenSSL with aes-256-cbc to encrypt a 30 GB tar file containing a recent backup of my hard drive. Now suppose somebody wants to run a brute-force attack on this file, trying out all possible password combinations. Does OpenSSL have to scan through the entire 30 GB of data in order to say whether the password matches or whether it doesn't match or can OpenSSL determine really quickly whether the specified password is the correct one?

In other words: Does it take longer to run a brute-force attack using OpenSSL on a 30 GB file than on a 100 KB file?

1 Answer 1


it depends, but - generally - no. AES is a block cipher, so you're breaknig a thing by 256 bit blocks in your case. And 100KB is more than enough to guess a type of "what's inside", by MIME, for example, after that a task is a way more simplier

  • Thanks, but I don't understand the second half of your answer. How can you guess what's inside by MIME without knowing the password? I thought it's only possible to know what's inside if you actually know the password?!
    – Andreas
    May 20, 2016 at 15:57
  • 1
    It's a nit, but I think AES256 has a 128 bit block size en.m.wikipedia.org/wiki/… May 20, 2016 at 16:09
  • 2
    @Andreas when decrypting you guess the password and you know you have the right one because the data looks good and makes sense. For example, the data looks like a disk image. Alexey is suggesting that ~100k is enough to know if it makes sense or not May 20, 2016 at 16:11
  • tar has strongly-nonrandom metadata; 1kB is more than enough to verify. If you actually have tar compressed with gzip or bzip2 or lzma, which are very common for large backups, probably even less. May 20, 2016 at 23:21
  • @NeilSmithline of course, AES256 block size is 128, I was talking about a portion of the beginning of the file sufficient for MIME detection. May 21, 2016 at 13:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .