chapter four

4 Authenticated Encryption

 

This chapter covers:

  • Symmetric Encryption, a cryptographic primitive to hide communication from observers
  • Authenticated Encryption, the secure evolution of symmetric encryption.
  • The popular authenticated encryption algorithms.
  • Other types of symmetric encryption.

This is where it all began: the science of cryptography was first and foremost invented to fill our need to hide information. Encryption is what pre-occupied most of the early cryptographers: "How can we prevent observers from understanding our conversations?". While the science and its advances first bloomed behind closed door, benefiting the governments and their military only, it has now opened and spread throughout the world. Today, encryption is used everywhere to add a sense of privacy and security in the different aspects of our modern lives. In this chapter we’ll find out what encryption really is, what types of problem it solves and how today’s applications makes use of this cryptographic primitive.

For this chapter you’ll need to have read:

  • Chapter 3 on Message Authentication Codes.

4.1  What Is a Cipher?

So far we’ve talked about hash functions and message authentication codes (MACs). These two constructions have distinctive interfaces that we recapitulate in figure 4.1.

Figure 4.1. The interfaces of the hash function and the message authentication code.
recap interface

We will now attempt to introduce one as equally important cryptographic primitive: authenticated encryption.

4.2  Symmetric Encryption in the real-world

4.3  The AES-CBC-HMAC Encryption Algorithm

4.3.1  The Advanced Encryption Standard (AES)

4.3.2  Mode of operation and integrity: How AES-CBC-HMAC works

4.4  Authenticated Encryption with Associated Data (AEAD)

4.4.1  What is an AEAD?

4.4.2  The AES-GCM AEAD

4.4.3  Chacha20-Poly1305

4.5  Key Wrapping and Nonce-Misuse Resistance

4.5.1  Wrapping Keys: How To Encrypt Secrets

4.5.2  AES-GCM-SIV and Nonce-Misuse Resistance Authenticated Encryption

4.6  A Map of Authenticated Encryption

4.7  Other Kinds of Symmetric Encryption