Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When using AES, is there a way to tell if data was encrypted using 128 or 256 bit keys?

Tags:

encryption

aes

I was wondering if there is some way to tell if data was encrypted with a specific key size, without the source code of course. Is there any detectable differences with the data that you can check post encryption?

like image 273
Matt Avatar asked Apr 27 '11 22:04

Matt


People also ask

How do you identify my AES encryption is 128 or 256?

The three AES varieties are also distinguished by the number of rounds of encryption. AES 128 uses 10 rounds, AES 192 uses 12 rounds, and AES 256 uses 14 rounds. The more rounds, the more complex the encryption, making AES 256 the most secure AES implementation.

How do we know data is encrypted?

In the Data Protection window, click on the icon of the hard drive (aka System Storage). Under System Storage, if you see the following text: OSDisk (C) and In compliance underneath, then your hard drive is encrypted.

What is the difference between 128 and 256-bit encryption?

A 128-bit level of encryption has 2128 possible key combinations (340,282,366,920,938,463,463,374,607,431,768,211,456 – 39 digits long) and 256-bit AES encryption has 2256 possible key combinations (a number 78 digits long).


1 Answers

No there is not any way to do that. Both encrypt 16-byte chunks of data and the resulting blocks would "look" the same after the encryption is complete (they would have different values, but an analysis on only the encrypted data would not be able to determine the original key size). If the original data (plain text) is available, it may be possible to do some kind of analysis.

A very simplistic "proof" is:

  • For a given input, the length of the output is the same regardless of the key size. It may, however, differ depending on the mode (CBC, CTR, etc.).
  • Since the encryption is reversible, it can be considered to be a one-to-one function. In other words, a different input results in a different output.
  • Therefore, it is possible to produce any given output (by changing the plain text) regardless of the key size.

Thus, for a given password, you could end up with the same output by using the appropriate plain text regardless of the key size. This "proof" has a hole in that padding schemes can result in a longer output than input (so the function is not necessarily onto.) But I doubt this would make a difference in the end result.

like image 91
Mark Wilkins Avatar answered Sep 28 '22 23:09

Mark Wilkins