0
$\begingroup$

I have been trying to study for cryptographic symmetric algorithms (AES,DES) and came up with a question whether these two on their own ensure integrity (i.e data has not been altered). Do these two need message digests in order to ensure it?

I have also seen this paper, but it does not show 'how' these two algorithms ensure integrity.

$\endgroup$

2 Answers 2

7
$\begingroup$

Answer to your question title: they don't.

Answer to your inline question: yes (or something similar to it).

Longer answer:

Both DES and AES are examples of block ciphers, and block ciphers do not have any inherent integrity protection. Thus, in order to also ensure integrity you would need to add something more, for example a message authentication code (MAC) or a digital signature.

However, note that you would probably never want to combine DES and AES directly with, say, a MAC. Instead, you would want to use DES and AES in a dedicated mode-of-operation that provides both confidentiality and integrity for you (which together is called authenticated encryption).

$\endgroup$
7
  • $\begingroup$ hello, so using AEs or DES with message digest or MAC will eventually lead to data integrity? $\endgroup$
    – Javazzs
    Apr 14, 2020 at 8:41
  • $\begingroup$ @Javazzs If by message digest you mean an unkeyed hash function, like SHA2 or SHA3, then no. But a MAC will (provided it is used correctly of course). $\endgroup$
    – hakoja
    Apr 14, 2020 at 8:43
  • $\begingroup$ @haskoja also are these used in order to encrypt that digest ? (or MAC ) $\endgroup$
    – Javazzs
    Apr 14, 2020 at 8:43
  • $\begingroup$ @Javazzs I'm not really sure I understand what you mean by "these"? $\endgroup$
    – hakoja
    Apr 14, 2020 at 8:44
  • $\begingroup$ @haskoja AES and DES. $\endgroup$
    – Javazzs
    Apr 14, 2020 at 8:45
4
$\begingroup$

In addition to the nice other answer:

Common/classic ways to obtain data integrity with block ciphers like (3)DES or AES are the schemes in the ISO/IEC 9797-1 standard, collectively known as CBC-MAC. Beware that

  1. Some modes of the standard can be insecure (as noted therein, those that do not include the length in the first block), but not when the messages authenticated are of fixed size or when the key is used for authenticating a single message.
  2. The key for authentication using CBC-MAC must not be the same as the key for confidentiality when using the same block cipher in a common operating mode for confidentiality. When both confidentiality and authentication are needed, authenticated encryption modes such as AES-GCM or AES-GCM-SIV may be be simpler/safer/better if the environment has support for that. Otherwise, it is possible to derive an encryption key and a CBC-MAC authentication key from a common key.
$\endgroup$

Your Answer

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

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