AESNI(4)
π AESNI(4) π
okay bestie, welcome to aesni(4), aka the manual page for the driver for the AES and SHA accelerator on x86 CPUs. yes that's the title AND the name, we're being efficient today β¨
πΈ NAME πΈ
aesni β the driver for the AES and SHA accelerator on x86 CPUs, no cap π«Ά
β¨ SYNOPSIS β¨
so if you want to compile this driver into the kernel (iconic move, very committed of you), you drop these lines into your kernel configuration file:
device crypto
device cryptodev
device aesni
alternatively, if you'd rather load the driver as a module at boot time (lowkey the easier route tbh), you put this line in loader.conf(5):
aesni_load="YES"
that's it. that's the whole vibe check π
π₯ DESCRIPTION π₯
okay so starting with Intel Westmere and AMD Bulldozer, some x86 processors implement a new set of instructions called AESNI. the set of six instructions accelerates the calculation of the key schedule for key lengths of 128, 192, and 256 of the Advanced Encryption Standard (AES) symmetric cipher, and it also provides a hardware implementation of the regular and the last encryption and decryption rounds. it's giving hardware go brrr π
the processor capability is reported as AESNI in the Features2 line at boot. iykyk, go check your dmesg π
then β starting with the Intel Goldmont and AMD Ryzen microarchitectures β some x86 processors implement a new set of SHA instructions. this set of seven instructions accelerates the calculation of SHA1 and SHA256 hashes. obsessed honestly π¦
this processor capability is reported as SHA in the Structured Extended Features line at boot.
now the important bit, bestie, listen up π: the aesni driver does not attach on systems that lack both CPU capabilities. but on systems that support only one of the AESNI or SHA extensions, the driver will attach and support that one function. equality, we love to see it π«Ά
the aesni driver registers itself to accelerate AES and SHA operations for crypto(4). and besides the obvious speed thing, the advantage of using the aesni driver is that the AESNI operation is data-independent β which eliminates some attack vectors based on measuring cache use and timings that are typically present in table-driven implementations. so it's fast and it's secure, main character energy fr fr π₯
π SEE ALSO π
go read them, they're all slay in their own way β¨
π HISTORY π
the aesni driver first appeared in FreeBSD 9.0. and the SHA support was added later, in FreeBSD 12.0. glow-up era πΈ
π§ AUTHORS π§
the aesni driver was written by Konstantin Belousov <kib@FreeBSD.org> and Conrad Meyer <cem@FreeBSD.org>. the key schedule calculation code was adopted from the sample provided by Intel and used in the analogous OpenBSD driver. and the hash step intrinsics implementations were supplied by Intel. legends, all of them π
ngl this whole thing is a flex: hardware crypto that doesn't leak your secrets through timing side channels. protect her at all costs π
that's the page bestie, hope it ate π β this one came from the Debian edition, dated July 29, 2020. bye babe, stay encrypted π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2010 Konstantin Belousov <kib@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms