# TLS: Favor ChaCha over AES-based ciphers on CPUs without AES support \(\#15034\) · gitcafe/zig

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

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

Visibility: public

Requested revision: d61ac0db8c62f706ea65b70d2772cbb8c4efb416

Requested commit: d61ac0db8c62f706ea65b70d2772cbb8c4efb416

Commit: d61ac0db8c62f706ea65b70d2772cbb8c4efb416

Tree: a91283de1e3db79d3c49f5ac5c512d271f328fd0

Author: Frank Denis

Committer: GitHub

## Message

```
TLS: Favor ChaCha over AES-based ciphers on CPUs without AES support (#15034)

On CPUs without AES support, ChaCha is always faster and safer than
software AES.

Add `crypto.core.aes.has_hardware_support` to represent whether
AES acceleration is available or not, and in `tls.Client`, favor
AES-based ciphers only if hardware support is available.

This matches what BoringSSL is doing.
```

## Parents

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

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