Assume that a company wants to use DES in order to encrypt messages to remotely control its manufacturing machines. The company uses different messages types of 8 ASCII characters length each. The message payloads consist of simple operational orders like starting machines, stopping them, speeding up, etc.

The company considers to run DES in OFB mode (i.e., as a stream cipher). Assuming the eavesdropper has somehow figured out that the majority of all exchanged messages carry the payload INACTIVE. What (if any) information can an eavesdropper infer?

Any suggestions ???


For DES we generally assume that an attacker can find out all information as the attacker can simply brute force the key. For a more secure protocol you could use another 64 bit block cipher such as triple DES (in three key mode, i.e. with keys of 168/192 bits) or another cipher such as Blowfish. However, if you want to use a streaming cipher you could also use AES, e.g. CTR or CFB mode; OFB isn't used all that often anymore and may not be available in all runtimes.

A block cipher is deterministic. This means that any repeating 8-byte message that is directly encrypted with it will result in the same ciphertext as the previously encrypted message with the same contents. This will therefore leak information to an attacker. Modes of operations such as OFB require a unique IV for each message so that this information is hidden. So no information can be inferred if the IV is indeed unique (assuming that the message size is indeed always constant).


  • Note that encryption does not automatically protect the message for integrity / authenticity. You need a MAC or authenticated encryption (e.g. GCM mode) for that;
  • You may need to keep in mind that you should design for key change. If you for instance use a 64 bit (8-byte) random value then you may run into collisions after many messages and this will completely destroy the confidentiality of those messages in OFB mode;
  • You clearly need expert help. If you cannot afford that you may want to look into using transport security such as TLS or SSH or a lightweight protocol for embedded systems instead of trying to figure our your own protocol.
  • 2
    $\begingroup$ Note that if you are using OFB (without authentication) and your plaintext is very predictable, it may easily be changed from INACTIVE to RUN-AT-10x-SPEED which may end badly for the machines.... $\endgroup$ – SEJPM May 18 '18 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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