# std/crypto: XChaCha20, detached modes and standard AEAD API · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/795033c35fd7bb411277079e72b148bf7810c18e)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 795033c35fd7bb411277079e72b148bf7810c18e

Requested commit: 795033c35fd7bb411277079e72b148bf7810c18e

Commit: 795033c35fd7bb411277079e72b148bf7810c18e

Tree: 42862bab9797b6e613479f64c63393525288664b

Author: Frank Denis

Committer: Andrew Kelley

## Message

```
std/crypto: XChaCha20, detached modes and standard AEAD API

* Factor redundant code in std/crypto/chacha20

* Add support for XChaCha20, and the XChaCha20-Poly1305 construction.

XChaCha20 is a 24-byte version of ChaCha20, is widely implemented
and is on the standards track:
https://tools.ietf.org/html/draft-irtf-cfrg-xchacha-03

* Add support for encryption/decryption with the authentication tag
detached from the ciphertext

* Add wrappers with an API similar to the Gimli AEAD type, so that
we can use and benchmark AEADs with a common API.

```

## Parents

- [5cb96681d92e7a410577215ff057e459f10304dc](https://git.cafe/gitcafe/zig/commit/5cb96681d92e7a410577215ff057e459f10304dc?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/795033c35fd7bb411277079e72b148bf7810c18e?format=markdown)
