4

While bruteforcing a ciphertext, I've found multiple keys which produce the same result.

Mode is DES with ECB and PKCS5 padding.
ciphertext is TXcmk8KwIPxTHR45zAIGJPEFYj6dsgVOGseZnMcedCOhl/Qp5a8Qig==
keys are used: { !*}, { +}, { *}

The tried keys are delimited by brackets {} and white space included.

The ciphertext will be decrypted as 'Does DES had multiple key for Enc/Dec?' with these keys..

tested at http://8gwifi.org/CipherFunctions.jsp and with pyDES(https://pypi.python.org/pypi/pyDes/)

Artjom B.
  • 2,085
  • 1
  • 23
  • 53

1 Answers1

4

The DES operation (both encryption and decryption) ignores the lsbit of each byte of the key. That is, if you flip any of the lsbits within the key, the operation remains the same. That's what is happening in the keys you tried: the ASCII code for space is 0x20, while the ASCII code for ! is 0x21; they differ only in the lsbit. So, if the key has a byte with the ASCII code for a space, you could replace it with a !, and it'll still be able to decrypt. Similarly, the ASCII code for * is 0x2a, while the ASCII code for + is 0x2b; also differs only in the lsbit.

In the original DES standard, the lsbit was supposed to be used as a parity check bit (with each byte always having odd parity). It was supposed to be a weak error check for manually entered keys. Nowadays, no one does this parity check, and so the lsbit gets ignored.

poncho
  • 154,064
  • 12
  • 239
  • 382