# Revamp crypto/aes · gitcafe/zig

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

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

Visibility: public

Requested revision: bd89bd6fdbcc0ce5ea7763a8043fd46099022b19

Requested commit: bd89bd6fdbcc0ce5ea7763a8043fd46099022b19

Commit: bd89bd6fdbcc0ce5ea7763a8043fd46099022b19

Tree: fb79f3598f44badcf0842ee3cef9853d44be2cf9

Author: Frank Denis

Committer: Andrew Kelley

## Message

```
Revamp crypto/aes

* Reorganize crypto/aes in order to separate parameters, implementations and
modes.
* Add a zero-cost abstraction over the internal representation of a block,
so that blocks can be kept in vector registers in optimized implementations.
* Add architecture-independent aesenc/aesdec/aesenclast/aesdeclast operations,
so that any AES-based primitive can be implemented, including these that don't
use the original key schedule (AES-PRF, AEGIS, MeowHash...)
* Add support for parallelization/wide blocks to take advantage of hardware
implementations.
* Align T-tables to cache lines in the software implementations to slightly
reduce side channels.
* Add an optimized implementation for modern Intel CPUs with AES-NI.
* Add new tests (AES256 key expansion).
* Reimplement the counter mode to work with any block cipher, any endianness
and to take advantage of wide blocks.
* Add benchmarks for AES.

```

## Parents

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

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