2
$\begingroup$

In an Ars Technica article about Adobe's use of 3DES in ECB mode, there's a paragraph

The passwords, according to password expert Steve "Sc00bz" Thomas, are encrypted in a mode known as ECB. That was a poor choice on the part of Adobe engineers, because ECB often leaks information about the passwords, such as their last few characters and some of their lengths. In certain cases, for example, passwords that end in e will generate an encrypted string that ends in n2auThm2+Q==; those that are nine or 17 characters long will sometimes end in mfZq5OGbb5.

Is it really the case?

$\endgroup$
2
  • 1
    $\begingroup$ @Reid What the fuck. $\endgroup$
    – orlp
    Nov 3, 2013 at 1:10
  • $\begingroup$ I find myself wondering more why they've got an encryption of the password rather than a hash. $\endgroup$ Nov 3, 2013 at 10:25

3 Answers 3

7
$\begingroup$

The article mentions that 3-DES was used to encrypt these passwords in ECB mode. DES has a 64-bit/8-byte block.

So let's say you use ECB to encrypt a nine byte password. The first 8-bytes are encrypted using ECB. So far so good.

But what happens when we come to the ninth byte? Well we're now in a new block but only the first byte is populated with any data. The rest are zeros (assuming no padding is used).

This means that there are only 256 possible encryptions of the second block for all nine byte passwords. With a large enough database, it will be relatively easy to guess what these encryptions are. If you had a dictionary of common nine character passwords, a mere frequency analysis of the last character of the password and a comparison to the frequency of the second ECB blocks would be enough!

So yes, the paragraph is correct. It's a significant hole in the scheme they used.

$\endgroup$
1
  • $\begingroup$ It does not matter what padding mode is used, as long as it is deterministic. $\endgroup$
    – Maarten Bodewes
    Nov 3, 2013 at 13:55
2
$\begingroup$

ECB leaks the identity of blocks. After padding some blocks on the end will be eminently predictable, for instance a block with a single 'e' and all zero padding.

$\endgroup$
1
$\begingroup$

It is the case. All 8 character passwords in the leaked file end in "ioxG6CatHBw==" Source: http://pastebin.com/iDTFARwq

$\endgroup$

Your Answer

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

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