AES instruction set
Instruction set extensions accelerating AES operations From Wikipedia, the free encyclopedia
An AES (Advanced Encryption Standard) instruction set is a set of instructions that are specifically designed to perform AES encryption and decryption operations efficiently. These instructions are typically found in modern processors and can greatly accelerate AES operations compared to software implementations. An AES instruction set includes instructions for key expansion, encryption, and decryption using various key sizes (128-bit, 192-bit, and 256-bit).
The instruction set is often implemented as a set of instructions that can perform a single round of AES along with a special version for the last round which has a slightly different method.
When AES is implemented as an instruction set instead of as software, it can have improved security, as its side channel attack surface is reduced.[1]
x86 architecture processors
Summarize
Perspective
AES-NI (or the Intel Advanced Encryption Standard New Instructions; AES-NI) was the first major implementation. AES-NI is an extension to the x86 instruction set architecture for microprocessors from Intel and AMD proposed by Intel in March 2008.[2]
A wider version of AES-NI, AVX-512 Vector AES instructions (VAES), is found in AVX-512.[3]
Instructions
Instruction | Description[4] |
---|---|
AESENC |
Perform one round of an AES encryption flow |
AESENCLAST |
Perform the last round of an AES encryption flow |
AESDEC |
Perform one round of an AES decryption flow |
AESDECLAST |
Perform the last round of an AES decryption flow |
AESKEYGENASSIST |
Assist in AES round key generation[note 1] |
AESIMC |
Assist in AES decryption round key generation. Applies Inverse Mix Columns to round keys. |
Intel
The following Intel processors support the AES-NI instruction set:[5]
- Westmere based processors, specifically:
- Sandy Bridge processors:
- Ivy Bridge processors
- All i5, i7, Xeon and i3-2115C[10] only
- Haswell processors (all except i3-4000m,[11] Pentium and Celeron)
- Broadwell processors (all except Pentium and Celeron)
- Silvermont/Airmont processors (all except Bay Trail-D and Bay Trail-M)
- Goldmont (and later) processors
- Skylake (and later) processors
AMD
Several AMD processors support AES instructions:
- "Heavy Equipment" processors
- Bulldozer processors[12]
- Piledriver processors
- Steamroller processors
- Excavator processors and newer
- Jaguar processors and newer
- Puma processors and newer
- Zen (and later) based processors
Hardware acceleration in other architectures
Summarize
Perspective
AES support with unprivileged processor instructions is also available in the latest SPARC processors (T3, T4, T5, M5, and forward) and in latest ARM processors. The SPARC T4 processor, introduced in 2011, has user-level instructions implementing AES rounds.[13] These instructions are in addition to higher level encryption commands. The ARMv8-A processor architecture, announced in 2011, including the ARM Cortex-A53 and A57 (but not previous v7 processors like the Cortex A5, 7, 8, 9, 11, 15 [citation needed]) also have user-level instructions which implement AES rounds.[14]
x86 CPUs offering non-AES-NI acceleration interfaces
VIA x86 CPUs and AMD Geode use driver-based accelerated AES handling instead. (See Crypto API (Linux).)
The following chips, while supporting AES hardware acceleration, do not support AES-NI:
ARM architecture
Programming information is available in ARM Architecture Reference Manual ARMv8, for ARMv8-A architecture profile (Section A2.3 "The Armv8 Cryptographic Extension").[20]
The Marvell Kirkwood was the embedded core of a range of SoC from Marvell Technology, these SoC CPUs (ARM, mv_cesa in Linux) use driver-based accelerated AES handling. (See Crypto API (Linux).)
- ARMv8-A architecture
- ARM cryptographic extensions are optionally supported on ARM Cortex-A30/50/70 cores
- Cryptographic hardware accelerators/engines
RISC-V architecture
The scalar and vector cryptographic instruction set extensions for the RISC-V architecture were ratified respectively on 2022 and 2023, which allowed RISC-V processors to implement hardware acceleration for AES, GHASH, SHA-256, SHA-512, SM3, and SM4.
Before the AES-specific instructions were available on RISC-V, a number of RISC-V chips included integrated AES co-processors. Examples include:
POWER architecture
Since the Power ISA v.2.07, the instructions vcipher
and vcipherlast
implement one round of AES directly.[30]
IBM z/Architecture
IBM z9 or later mainframe processors support AES as single-opcode (KM, KMC) AES ECB/CBC instructions via IBM's CryptoExpress hardware.[31] These single-instruction AES versions are therefore easier to use than Intel NI ones, but may not be extended to implement other algorithms based on AES round functions (such as the Whirlpool and Grøstl hash functions).
Other architectures
- Atmel XMEGA[32] (on-chip accelerator with parallel execution, not an instruction)
- SPARC T3 and later processors have hardware support for several cryptographic algorithms, including AES.
- Cavium Octeon MIPS[33] All Cavium Octeon MIPS-based processors have hardware support for several cryptographic algorithms, including AES using special coprocessor 3 instructions.
Performance
In AES-NI Performance Analyzed, Patrick Schmid and Achim Roos found "impressive results from a handful of applications already optimized to take advantage of Intel's AES-NI capability".[34] A performance analysis using the Crypto++ security library showed an increase in throughput from approximately 28.0 cycles per byte to 3.5 cycles per byte with AES/GCM versus a Pentium 4 with no acceleration.[35][36][failed verification] [better source needed]
Supporting software
Most modern compilers can emit AES instructions.
A lot of security and cryptography software supports the AES instruction set, including the following notable core infrastructure:
- Apple's FileVault 2 full-disk encryption in macOS 10.10+
- NonStop SSH2, NonStop cF SSL Library and BackBox VTC Software in HPE Tandem NonStop OS L-series[37][38][39]
- Cryptography API: Next Generation (CNG) (requires Windows 7)[40]
- Linux's Crypto API
- Java 7 HotSpot
- Network Security Services (NSS) version 3.13 and above[41] (used by Firefox and Google Chrome)
- Solaris Cryptographic Framework[42] on Solaris 10 onwards
- FreeBSD's OpenCrypto API (aesni(4) driver)[43]
- OpenSSL 1.0.1 and above[44]
- GnuTLS[45]
- Libsodium[46]
- VeraCrypt[47]
- Go programming language[48]
- BitLocker[49]
- Bloombase[50]
- Vormetric[51]
Application beyond AES
A fringe use of the AES instruction set involves using it on block ciphers with a similarly-structured S-box, using affine transform to convert between the two. SM4, Camellia and ARIA have been accelerated using AES-NI.[52][53][54] The AVX-512 Galois Field New Instructions (GFNI) allows implementing these S-boxes in a more direct way.[55]
New cryptographic algorithms have been constructed to specifically use parts of the AES algorithm, so that the AES instruction set can be used for speedups. The AEGIS family, which offers authenticated encryption, runs with at least twice the speed of AES.[56] AEGIS is an "additional finalist for high-performance applications" in the CAESAR Competition.[57]
See also
- Advanced Vector Extensions (AVX)
- CLMUL instruction set
- FMA instruction set (FMA3, FMA4)
RDRAND
Notes
- The instruction computes 4 parallel subexpressions of AES key expansion on 4 32-bit words in a double quadword (aka SSE register) on bits X[127:96] for and X[63:32] for only. Two parallel AES S-box substitutions and are used in AES-256 and 2 subexpressions and are used in AES-128, AES-192, AES-256.
References
External links
Wikiwand - on
Seamless Wikipedia browsing. On steroids.