Authenticated encryption

Short description: Encryption method

Authenticated encryption (AE) is any encryption scheme which simultaneously assures the data confidentiality (also known as privacy: the encrypted message is impossible to understand without the knowledge of a secret key[1]) and authenticity (in other words, it is unforgeable:[2] the encrypted message includes an authentication tag that the sender can calculate only while possessing the secret key[1]). Examples of encryption modes that provide AE are GCM, CCM.[1]

Many (but not all) AE schemes allow the message to contain "associated data" (AD) which is not made confidential, but is integrity protected (i.e., readable, but tamperevident). A typical example is the header of a network packet that contains its destination address. To properly route the packet, all intermediate nodes in the message path need to know the destination, but for security reasons they cannot possess the secret key.[3] Schemes that allow associated data provide authenticated encryption with associated data, or AEAD.[3]

## Contents

* 1 Programming interface
* 2 History
* 3 Variants
* 3.1 Authenticated encryption with associated data
* 3.2 Key-committing AEAD
* 3.3 Misuse-resistant authenticated encryption
* 4 Approaches to authenticated encryption
* 4.1 Encrypt-then-MAC (EtM)
* 4.2 Encrypt-and-MAC (E&M)
* 4.3 MAC-then-Encrypt (MtE)
* 5 See also
* 6 References
* 7 Sources

## Programming interface

A typical programming interface for an AE implementation provides the following functions:

* Encryption
* Input: plaintext, key, and optionally a header (also known as additional authenticated data, AAD, or associated data, AD) in plaintext that will not be encrypted, but will be covered by authenticity protection.
* Output: ciphertext and authentication tag (message authentication code or MAC).
* Decryption
* Input: ciphertext, key, authentication tag, and optionally a header (if used during the encryption).
* Output: plaintext, or an error if the authentication tag does not match the supplied ciphertext or header.

The header part is intended to provide authenticity and integrity protection for networking or storage metadata for which confidentiality is unnecessary, but authenticity is desired.

## History

The need for authenticated encryption emerged from the observation that securely combining separate confidentiality and authentication block cipher operation modes could be error prone and difficult.[4][5] This was confirmed by a number of practical attacks introduced into production protocols and applications by incorrect implementation, or lack of authentication.[6]

Around the year 2000, a number of efforts evolved around the notion of standardizing modes that ensured correct implementation. In particular, strong interest in possibly secure modes was sparked by the publication of Charanjit Jutla's integrity-aware CBC and integrity-aware parallelizable, IAPM, modes[7] in 2000 (see OCB and chronology[8]). Six different authenticated encryption modes (namely offset codebook mode 2.0, OCB 2.0; Key Wrap; counter with CBC-MAC, CCM; encrypt then authenticate then translate, EAX; encrypt-then-MAC, EtM; and Galois/counter mode, GCM) have been standardized in ISO/IEC 19772:2009.[9] More authenticated encryption methods were developed in response to NIST solicitation.[10] Sponge functions can be used in duplex mode to provide authenticated encryption.[11]

Bellare and Namprempre (2000) analyzed three compositions of encryption and MAC primitives, and demonstrated that encrypting a message and subsequently applying a MAC to the ciphertext (the Encrypt-then-MAC approach) implies security against an adaptive chosen ciphertext attack, provided that both functions meet minimum required properties. Katz and Yung investigated the notion under the name "unforgeable encryption" and proved it implies security against chosen ciphertext attacks.[12]

In 2013, the CAESAR competition was announced to encourage design of authenticated encryption modes.[13]

In 2015, ChaCha20-Poly1305 is added as an alternative AE construction to GCM in IETF protocols.

## Variants

### Authenticated encryption with associated data

Authenticated encryption with associated data (AEAD) is a variant of AE that allows the message to include "associated data" (AD, additional non-confidential information, a.k.a. "additional authenticated data", AAD). A recipient can check the integrity of both the associated data and the confidential information in a message. AD is useful, for example, in network packets where the header should be visible for routing, but the payload needs to be confidential, and both need integrity and authenticity. The notion of AEAD was formalized by Rogaway (2002).[3]

### Key-committing AEAD

AE was originally designed primarily to provide the ciphertext integrity: successful validation of an authentication tag by Alice using her symmetric key KA indicates that the message was not tampered with by an adversary Mallory that does not possess the KA. The AE schemes usually do not provide the key commitment, a guarantee that the decryption would fail for any other key.[14] As of 2021, most existing AE schemes (including the very popular GCM) allow some messages to be decrypted without an error using more than just the (correct) KA; while the plaintext decrypted using a second (wrong) key KM will be incorrect, the authentication tag would still match the new plaintext.[15] Since crafting a message with such property requires Mallory to already possess both KA and KM, the issue might appear to be one of a purely academic interest.[16] However, under special circumstances, practical attacks can be mounted against vulnerable implementations. For example, if an identity authentication protocol is based on successful decryption of a message that uses a password-based key, Mallory's ability to craft a single message that would be successfully decrypted using 1000 different keys associated with weak, and thus known to her, potential passwords, can speed up her search for passwords by a factor of almost 1000. For this dictionary attack to succeed, Mallory also needs an ability to distinguish successful decryption by Alice from an unsuccessful one, due, for example, to a poor protocol design or implementation turning Alice's side into an oracle. Naturally, this attack cannot be mounted at all when the keys are generated randomly.[17]

Key commitment was originally studied in the 2010s by Abdalla et al.[18] and Farshim et al.[19] under the name "robust encryption".[16][20]

To mitigate the attack described above without removing the "oracle", a key-committing AEAD that does not allow this type of crafted messages to exist can be used. AEGIS is an example of fast (if the AES instruction set is present), key-committing AEAD.[21] It is possible to add key-commitment to an existing AEAD scheme.[22][23]

### Misuse-resistant authenticated encryption

Misuse-resistant authenticated encryption (MRAE) has the additional property that reusing the same nonce for several messages does not allow an attacker to recover the plaintext. MRAE was formalized in 2006 by Phillip Rogaway and Thomas Shrimpton.[24] One example of a MRAE algorithm is AES-GCM-SIV.

## Approaches to authenticated encryption

### Encrypt-then-MAC (EtM)

EtM approach

The plaintext is first encrypted, then a MAC is produced based on the resulting ciphertext. The ciphertext and its MAC are sent together. ETM is the standard method according to ISO/IEC 19772:2009.[9] It is the only method which can reach the highest definition of security in AE, but this can only be achieved when the MAC used is "strongly unforgeable".[25]

IPSec adopted EtM in 2005.[26] In November 2014, TLS and DTLS received extensions for EtM with RFC 7366. Various EtM ciphersuites exist for SSHv2 as well (e.g., hmac-sha1-etm@openssh.com).

### Encrypt-and-MAC (E&M)

E&M approach

A MAC is produced based on the plaintext, and the plaintext is encrypted without the MAC. The plaintext's MAC and the ciphertext are sent together. Used in, e.g., SSH.[27] Even though the E&M approach has not been proved to be strongly unforgeable in itself,[25] it is possible to apply some minor modifications to SSH to make it strongly unforgeable despite the approach.[28]

### MAC-then-Encrypt (MtE)

MtE approach

A MAC is produced based on the plaintext, then the plaintext and MAC are together encrypted to produce a ciphertext based on both. The ciphertext (containing an encrypted MAC) is sent. Until TLS 1.2, all available SSL/TLS cipher suites were MtE.[29]

MtE has not been proven to be strongly unforgeable in itself.[25] The SSL/TLS implementation has been proven to be strongly unforgeable by Krawczyk who showed that SSL/TLS was, in fact, secure because of the encoding used alongside the MtE mechanism.[30] However, Krawczyk's proof contains flawed assumptions about the randomness of the initialization vector (IV). The 2011 BEAST attack exploited the non-random chained IV and broke all CBC algorithms in TLS 1.0 and under.[31]

In addition, deeper analysis of SSL/TLS modeled the protection as MAC-then-pad-then-encrypt, i.e. the plaintext is first padded to the block size of the encryption function. Padding errors often result in the detectable errors on the recipient's side, which in turn lead to padding oracle attacks, such as Lucky Thirteen.

## See also

* Block cipher mode of operation
* CCM mode
* CWC mode
* OCB mode
* EAX mode
* GCM
* GCM-SIV
* ChaCha20-Poly1305
* SGCM
* Signcryption

## References

1. ↑ 1.0 1.1 1.2 Black 2005, p. 1.
2. ↑ Katz & Lindell 2020, p. 116.
3. ↑ 3.0 3.1 3.2 Black 2005, p. 2.
4. ↑ "A Conventional Authenticated-Encryption Mode". NIST. http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/eax/eax-spec.pdf. "people had been doing rather poorly when they tried to glue together a traditional (privacy-only) encryption scheme and a message authentication code (MAC)"
5. ↑ "The CWC Authenticated Encryption (Associated Data) Mode". NIST. http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/cwc/cwc-spec.pdf. "it is very easy to accidentally combine secure encryption schemes with secure MACs and still get insecure authenticated encryption schemes"
6. ↑ "Failures of secret-key cryptography". Daniel J. Bernstein. https://cr.yp.to/talks/2013.03.12/slides.pdf.
7. ↑ Jutl, Charanjit S. (2000-08-01). "Encryption Modes with Almost Free Message Integrity". Cryptology ePrint Archive: Report 2000/039. IACR. https://eprint.iacr.org/2000/039.
8. ↑ T. Krovetz; P. Rogaway (2011-03-01). "The Software Performance of Authenticated-Encryption Modes". Fast Software Encryption 2011 (FSE 2011) (IACR). https://web.cs.ucdavis.edu/~rogaway/papers/ae.pdf.
9. ↑ 9.0 9.1 "Information technology -- Security techniques -- Authenticated encryption". 19772:2009. ISO/IEC. https://www.iso.org/iso/catalogue_detail.htm?csnumber=46345.
10. ↑ "Encryption modes development". NIST. http://csrc.nist.gov/groups/ST/toolkit/BCM/modes_development.html.
11. ↑ The Keccak Team. "Duplexing The Sponge". http://sponge.noekeon.org/SpongeDuplex.pdf.
12. ↑ Katz, J.; Yung, M. (2001). "Unforgeable Encryption and Chosen Ciphertext Secure Modes of Operation". in B. Schneier. Fast Software Encryption (FSE): 2000 Proceedings. Lecture Notes in Computer Science. 1978. pp. 284–299. doi:10.1007/3-540-44706-7_20. ISBN 978-3-540-41728-6.
13. ↑ "CAESAR: Competition for Authenticated Encryption: Security, Applicability, and Robustness". https://competitions.cr.yp.to/caesar.html.
14. ↑ Albertini et al. 2020, pp. 1–2.
15. ↑ "Invisible Salamanders Are Not What You Think" (in en-US). 2024-09-10. https://soatok.blog/2024/09/10/invisible-salamanders-are-not-what-you-think/.
16. ↑ 16.0 16.1 Albertini et al. 2020, p. 2.
17. ↑ Len, Julia; Grubbs, Paul; Ristenpart, Thomas (2021). "Partitioning Oracle Attacks" (in en). USENET '21. pp. 195–212. https://www.usenix.org/conference/usenixsecurity21/presentation/len.
18. ↑ Abdalla, Bellare & Neven 2010, pp. 480–497.
19. ↑ Farshim et al. 2013, pp. 352–368.
20. ↑ Bellare & Hoang 2022, p. 5.
21. ↑ Denis, Frank. "The AEGIS Family of Authenticated Encryption Algorithms" (in en). https://cfrg.github.io/draft-irtf-cfrg-aegis-aead/draft-irtf-cfrg-aegis-aead.html.
22. ↑ Gueron, Shay (2020). "Key Committing AEADs". https://eprint.iacr.org/2020/1153.pdf.
23. ↑ poncho. "Key Committing AEADs" (in en). https://crypto.stackexchange.com/a/87776. (See also the comment section discussing a revised libsodium recommendation for adding key-commitment.)
24. ↑ Rogaway, Phillip; Shrimpton, Thomas (2006). "Deterministic Authenticated-Encryption: A Provable-Security Treatment of the Key-Wrap Problem" (in en). EUROCRYPT. 4004. Springer. pp. 373-390. doi:10.1007/11761679_23. https://www.cs.ucdavis.edu/~rogaway/papers/keywrap.pdf. Retrieved 2025-06-22.
25. ↑ 25.0 25.1 25.2 "Authenticated Encryption: Relations among notions and analysis of the generic composition paradigm". M. Bellare and C. Namprempre. https://cseweb.ucsd.edu/~mihir/papers/oem.html.
26. ↑ Kent, Stephen (December 2005). "Separate Confidentiality and Integrity Algorithms". RFC 4303 - IP Encapsulating Security Payload (ESP) (Internet Engineering Task Force (IETF)). https://tools.ietf.org/html/rfc4303#section-3.3.2.1. Retrieved 2018-09-12.
27. ↑ Lonvick, Chris M.; Ylonen, Tatu (January 2006). "Data Integrity". RFC 4253 (Internet Engineering Task Force (IETF)). https://tools.ietf.org/html/rfc4253#section-6.4. Retrieved 2018-09-12.
28. ↑ Bellare, Mihir; Kohno, Tadayoshi; Namprempre, Chanathip. "Breaking and Provably Repairing the SSH Authenticated Encryption Scheme: A Case Study of the Encode-then-Encrypt-and-MAC Paradigm". ACM Transactions on Information and System Security. https://homes.cs.washington.edu/~yoshi/papers/SSH/ssh.pdf.
29. ↑ Rescorla, Eric; Dierks, Tim (August 2008). "Record Payload Protection". RFC 5246 (Internet Engineering Task Force (IETF)). https://tools.ietf.org/html/rfc5246#section-6.2.3. Retrieved 2018-09-12.
30. ↑ "The Order of Encryption and Authentication for Protecting Communications (Or: How Secure is SSL?)". H. Krawczyk. https://www.iacr.org/archive/crypto2001/21390309.pdf.
31. ↑ Duong, Thai; Rizzo, Juliano (May 13, 2011). "Here Come The ⊕ Ninjas". https://tlseminar.github.io/docs/beast.pdf. - BEAST attack whitepaper

General

* Bellare, M.; Namprempre, C. (2000), "Authenticated Encryption: Relations among Notions and Analysis of the Generic Composition Paradigm", in T. Okamoto, Advances in Cryptology — ASIACRYPT 2000, Lecture Notes in Computer Science, 1976, Springer-Verlag, pp. 531–545, doi:10.1007/3-540-44448-3_41, ISBN 978-3-540-41404-9, https://link.springer.com/content/pdf/10.1007/3-540-44448-3_41.pdf

## Sources

* Katz, J.; Lindell, Y. (2020). Introduction to Modern Cryptography. Chapman & Hall/CRC Cryptography and Network Security Series. CRC Press. ISBN 978-1-351-13301-2. https://books.google.com/books?id=RsoOEAAAQBAJ&pg=PT116. Retrieved 2023-06-08.
* Black, J. (2005). "Authenticated encryption". Encyclopedia of Cryptography and Security. Springer US. pp. 11–21. doi:10.1007/0-387-23483-7_15. ISBN 978-0-387-23473-1. https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=2628d946bda9f3d3b087e5c4846e76ae0fb07b6b.
* Albertini, Ange; Duong, Thai; Gueron, Shay; Kölbl, Stefan; Luykx, Atul; Schmieg, Sophie (2020). "How to Abuse and Fix Authenticated Encryption Without Key Commitment". USENIX. https://eprint.iacr.org/2020/1456.pdf.
* Bellare, Mihir; Hoang, Viet Tung (2022). "Efficient Schemes for Committing Authenticated Encryption". EUROCRYPT 2022. https://eprint.iacr.org/2022/268.pdf.
* Abdalla, Michel; Bellare, Mihir; Neven, Gregory (2010). "Robust Encryption". Theory of Cryptography. 5978. Berlin, Heidelberg: Springer Berlin Heidelberg. doi:10.1007/978-3-642-11799-2_28. ISBN 978-3-642-11798-5.
* Farshim, Pooya; Libert, Benoît; Paterson, Kenneth G.; Quaglia, Elizabeth A. (2013). "Robust Encryption, Revisited". Public-Key Cryptography – PKC 2013. 7778. Berlin, Heidelberg: Springer Berlin Heidelberg. doi:10.1007/978-3-642-36362-7_22. ISBN 978-3-642-36361-0.
* Chan, John; Rogaway, Phillip (2022). "On Committing Authenticated-Encryption". Computer Security – ESORICS 2022. 13555. Cham: Springer Nature Switzerland. doi:10.1007/978-3-031-17146-8_14. ISBN 978-3-031-17145-1.

* v
* t
* e

Cryptographic hash functions & message authentication codes

* List
* Comparison
* Known attacks

Common functions|

* MD5
* SHA-1
* SHA-2
* SHA-3
* BLAKE2

SHA-3 finalists|

* BLAKE
* Grøstl
* JH
* Skein
* Keccak (winner)

Other functions|

* CubeHash
* ECOH
* FSB
* GOST
* HAS-160
* HAVAL
* Kupyna
* LM hash
* MD2
* MD4
* MD6
* MDC-2
* N-Hash
* RIPEMD
* RadioGatún
* SM3
* SWIFFT
* Snefru
* Streebog
* Tiger
* VSH
* Whirlpool

Key derivation functions|

* Argon2
* Balloon
* bcrypt
* crypt
* Lyra2
* PBKDF2
* scrypt

MAC functions|

* DAA
* CBC-MAC
* GMAC
* HMAC
* NMAC
* OMAC/CMAC
* PMAC
* VMAC
* UMAC
* Poly1305
* SipHash

Authenticated
encryption modes|

* CCM
* CWC
* EAX
* GCM
* IAPM
* OCB

Attacks|

* Collision attack
* Preimage attack
* Birthday attack
* Brute-force attack
* Rainbow table
* Side-channel attack
* Length extension attack

Design|

* Avalanche effect
* Hash collision
* Merkle–Damgård construction
* Sponge function
* HAIFA construction

Standardization|

* CRYPTREC
* NESSIE
* NIST hash function competition

Utilization|

* Hash-based cryptography
* Key stretching
* Merkle tree
* Message authentication
* Proof of work
* Salt
* Pepper

* v
* t
* e

Cryptography

* History of cryptography
* Cryptanalysis
* Outline of cryptography

* Symmetric-key algorithm
* Block cipher
* Stream cipher
* Public-key cryptography
* Cryptographic hash function
* Message authentication code
* Random numbers
* Steganography

* Category

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Authenticated encryption. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Authenticated_encryption&oldid=4226503"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template