# Is it possible to break AES-128 ECB if you are given a ciphertext and a small portion of the key?

If you are given the ciphertext and the first half bytes (8 bytes) of the encryption key (key is 16 bytes in total), can you use this to break AES-128 ECB encryption and determine the last 8 bytes of the encryption key? (As opposed to trying all 256^8 possibilities for the last 8 bytes of the key, which is A LOT of possibilities and would take days/months to compute)

You can't use it to "break the encryption", but you can guess at the remaining 8 bytes of the key. The remaining 8 bytes should be feasible to find, especially if you can run the search in parallel.

The most correct answer would be "It depends".

There are attacks on AES with reduced rounds, which are better than brute force. If you give the attacker half of the key, he might be able to translate this knowledge on the round keys - but that's not for sure and for a detailed analysis it would be required to specify exactly which bits are given (and that would be far, far too much for a question here).

Depending on that knowledge about the round keys, it might be easier to find exploitable characteristics in the rounds, so that an attack is possible.

In general, this is loosely related to key-related attacks, where the attacker is not given part of the key, but he knows the relation between two keys (I think the XOR of the keys) and gets oracle access to both.

Regarding your last sentence: $2^{64}$ is a lot of possibilities, but the assumption about days/months not necessarily true. That depends highly on the amount of processing power you can get. For example the bitcoin network is (atm) roughly at 1800 peta-hashes per second (source). If we assume hashes and encrytpions take roughly the same time, the bitcoin network could try all $2^{64}$ in $\approx 10$ seconds. And the estimated time to find the correct one is half of that.

• If you take a look at the book "The Design of Rijndael" by Joan Daemen and Vincent Rijmen, the you will discover that two of the design criteria for the key scheduling are: (1) Diffusion: It should have an efficient diffusion of cipher key differences into the expanded key. (2) Non-linearity: It should exhibit enough non-linearity to prohibit the full determination of difference in the expanded key from cipher key diffe – Hope that's a start Nov 10 '16 at 11:57
• @Hopethat'sastart I am not sure what you are getting at. Those criteria are the same as for the block cipher itself. And that can be found in basically every single textbook about introduction to cryptography. And as far as we know, the only way to show security for block ciphers is by years of resisting proper cryptanalysis. If you give the attacker additional knowledge, past results are void. How exactly it influences those round keys - that's hard to tell. – tylo Nov 10 '16 at 15:37
• Any attack faster than $2^{64}/2$ against 64 missing bits of a 128-bit key directly translates into an attack faster by the same factor than $2^{128}/2$ against the full key. – CodesInChaos Nov 11 '16 at 12:04