# Authenticated encryption: why you need it and how it works

DevFeed: [Authenticated encryption: why you need it and how it works](<https://devfeed.tech/articles/authenticated-encryption-why-you-need-it-and-how-it-works-27114.md>)

Original publisher: [Read original article](<https://andrea.corbellini.name/2023/03/09/authenticated-encryption/>)

Author: andreacorbellini

Published: 2023-03-09T18:35:00Z

Content type: tutorial

Language: en

Sources: [Andrea Corbellini](<https://devfeed.tech/sources/andrea-corbellini.md>)

Topics: [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>), [ChaCha](<https://devfeed.tech/topics/chacha-cipher.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [cryptographic](<https://devfeed.tech/tags/cryptographic.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [private-key](<https://devfeed.tech/tags/private-key.md>), [public-key](<https://devfeed.tech/tags/public-key.md>), [stream](<https://devfeed.tech/tags/stream.md>), [xor](<https://devfeed.tech/tags/xor.md>)

## AI overview

This tutorial explains malleability in modern cryptographic ciphers and how authenticated encryption addresses it. It introduces symmetric ciphers, illustrates the issue with examples, and discusses ChaCha20-Poly1305 and AES-GCM.

## Source excerpt

In this article I want to explore a common problem of modern cryptographic ciphers: malleability. I will explain that problem with some hands-on examples, and then look in detail at how that problem is solved through the use of authenticated encryption. I will describe in particular two algorithms that provide authenticated encryption: ChaCha20-Poly1305 and AES-GCM, and briefly mention some of their variants. The problem ...