Short description: Extension to the x86 instruction set
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.[citation needed]
Contents
1x86 architecture processors
1.1Instructions
1.2Intel
1.3AMD
2Hardware acceleration in other architectures
2.1Supporting x86 CPUs
2.2ARM architecture
2.3RISC-V architecture
2.4POWER architecture
2.5IBM z/Architecture
2.6Other architectures
3Performance
4Supporting software
5See also
6Notes
7References
8External links
x86 architecture processors
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.[1]
A wider version of AES-NI, AVX-512 Vector AES instructions (VAES), is found in AVX-512.[2]
Instructions
Instruction
Description[3]
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:[4]
Westmere based processors, specifically:
Westmere-EP (a.k.a. Gulftown Xeon 5600-series DP server model) processors
Clarkdale processors (except Core i3, Pentium and Celeron)
Desktop: all except Pentium, Celeron, Core i3[5][6]
Mobile: all Core i7 and Core i5. Several vendors have shipped BIOS configurations with the extension disabled;[7] a BIOS update is required to enable them.[8]
Ivy Bridge processors
All i5, i7, Xeon and i3-2115C[9] only
Haswell processors (all except i3-4000m,[10] 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:
Jaguar processors and newer
Puma processors and newer
"Heavy Equipment" processors
Bulldozer processors[11]
Piledriver processors
Steamroller processors
Excavator processors and newer
Zen (and later) based processors
Hardware acceleration in other architectures
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.[12] 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.[13]
Supporting x86 CPUs
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:
AMD Geode LX processors[14]
VIA, using VIA PadLock[15][16]
VIA C3 Nehemiah C5P (Eden-N) processors[17]
VIA C7 Esther C5J processors[18]
ARM architecture
Programming information is available in ARM Architecture Reference Manual ARMv8, for ARMv8-A architecture profile (Section A2.3 "The Armv8 Cryptographic Extension").[19]
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
Allwinner
A10, A20, A30, A31, A80, A83T, H3 and A64 using Security System[20]
Broadcom
BCM5801/BCM5805/BCM5820 using Security Processor[16]
NXP Semiconductors
i.MX6 onwards[21]
Qualcomm
Snapdragon 805 onwards[22]
Rockchip
RK30xx series onwards[23]
Samsung
Exynos 3 series onwards[24]
RISC-V architecture
Whilst the RISC-V architecture does not include AES-specific instructions, a number of RISC-V chips include integrated AES co-processors. Examples include:
Dual-core RISC-V 64 bits Sipeed-M1 support AES and SHA256.[25]
RISC-V architecture based ESP32-C (as well as Xtensa-based ESP32[26]), support AES, SHA, RSA, RNG, HMAC, digital signature and XTS 128 for flash.[27]
Bouffalo Labs BL602/604 32-bit RISC-V supports various AES and SHA variants.[28]
POWER architecture
Since the Power ISA v.2.07, the instructions vcipher and vcipherlast implement one round of AES directly.[29]
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.[30] 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[31] (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[32] 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".[33] 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.[34][35][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[36][37][38]
Cryptography API: Next Generation (CNG) (requires Windows 7)[39]
Linux's Crypto API
Java 7 HotSpot
Network Security Services (NSS) version 3.13 and above[40] (used by Firefox and Google Chrome)
Solaris Cryptographic Framework[41] on Solaris 10 onwards
FreeBSD's OpenCrypto API (aesni(4) driver)[42]
OpenSSL 1.0.1 and above[43]
GnuTLS[44]
Libsodium[45]
VeraCrypt[46]
Go programming language[47]
BitLocker[48]
Bloombase[49]
Vormetric[50]
A fringe use of the AES instruction set involves using it on block ciphers with a similarly-structured S-box, using affine isomorphism to convert between the two. SM4 and Camellia have been accelerated using AES-NI.[51][52] The AVX-512 Galois Field New Instructions (GFNI) allows implementing these S-boxes in a more direct way.[53]
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 [math]\displaystyle{ i=3 }[/math] and X[63:32] for [math]\displaystyle{ i=1 }[/math] only. Two parallel AES S-box substitutions [math]\displaystyle{ Y_0=SubWord(X_1) }[/math] and [math]\displaystyle{ Y_2=SubWord(X_3) }[/math] are used in AES-256 and 2 subexpressions [math]\displaystyle{ Y_1=RotWord(SubWord(X_1)) \oplus rcon }[/math] and [math]\displaystyle{ Y_3=RotWord(SubWord(X_3)) \oplus rcon }[/math] are used in AES-128, AES-192, AES-256.
↑"Intel Architecture Instruction Set Extensions and Future Features Programming Reference". Intel. https://software.intel.com/en-us/intel-architecture-instruction-set-extensions-programming-reference.
↑Shay Gueron (2010). "Intel Advanced Encryption Standard (AES) Instruction Set White Paper". Intel. https://www.intel.com/content/dam/doc/white-paper/advanced-encryption-standard-new-instructions-set-paper.pdf.
↑"AES-NI support in TrueCrypt (Sandy Bridge problem)". 27 January 2022. http://forum.notebookreview.com/windows-os-software/582628-aes-ni-support-truecrypt-sandy-bridge-problem.html.
↑"Some products can support AES New Instructions with a Processor Configuration update, in particular, i7-2630QM/i7-2635QM, i7-2670QM/i7-2675QM, i5-2430M/i5-2435M, i5-2410M/i5-2415M. Please contact OEM for the BIOS that includes the latest Processor configuration update.". http://ark.intel.com/products/52224.
↑"Linux Cryptographic Acceleration on an i.MX6". Linux Foundation. February 2017. http://events17.linuxfoundation.org/sites/events/files/slides/2017-02 - ELC - Hudson - Linux Cryptographic Acceleration on an MX6.pdf.
↑"Cryptographic module in Snapdragon 805 is FIPS 140-2 certified". https://www.qualcomm.com/news/onq/2014/11/07/cryptographic-module-snapdragon-805-fips-140-2-certified.
↑"ESP32 Series Datasheet". 2021-03-19. https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf.
↑"ESP32-C3 WiFi & BLE RISC-V processor is pin-to-pin compatible with ESP8266". https://www.cnx-software.com/2020/11/22/esp32-c3-wifi-ble-risc-v-processor-is-pin-to-pin-compatible-with-esp8266/.
↑"Power ISA Version 2.07 B". https://ibm.ent.box.com/s/jd5w15gz301s5b5dt375mshpq9c3lh4u.
↑"IBM System z10 cryptography". IBM. http://www-03.ibm.com/systems/z/advantages/security/z10cryptography.html.
↑"Using the XMEGA built-in AES accelerator". http://www.atmel.com/Images/doc8106.pdf.
↑"Cavium Networks Launches Industry's Broadest Line of Single and Dual Core MIPS64-based OCTEON Processors Targeting Intelligent Next Generation Networks". http://www.cavium.com/newsevents_OCTEONMIPS64.html.
↑P. Schmid and A. Roos (2010). "AES-NI Performance Analyzed". Tom's Hardware. http://www.tomshardware.com/reviews/clarkdale-aes-ni-encryption,2538.html.
↑T. Krovetz, W. Dai (2010). "How to get fast AES calls?". Crypto++ user group. https://groups.google.com/group/cryptopp-users/msg/a688203c2314ef08.
↑"Vormetric Encryption Adds Support for Intel AES-NI Acceleration Technology". 15 May 2012. https://www.dbta.com/Editorial/News-Flashes/Vormetric-Encryption-Adds-Support-for-Intel-AES-NI-Acceleration-Technology-82614.aspx.
↑Saarinen, Markku-Juhani O. (17 April 2020). "mjosaarinen/sm4ni: Demonstration that AES-NI instructions can be used to implement the Chinese Encryption Standard SM4". https://github.com/mjosaarinen/sm4ni.
↑Kivilinna, Jussi (2013). Block Ciphers: Fast Implementations on x86-64 Architecture(PDF) (M.Sc.). University of Oulu. pp. 33, 42. Retrieved 2017-06-22.
↑Kivilinna, Jussi (19 April 2023). "camellia-simd-aesni". https://github.com/jkivilin/camellia-simd-aesni. "Newer x86-64 processors also support Galois Field New Instructions (GFNI) which allow implementing Camellia s-box more straightforward manner and yield even better performance."
External links
Intel Advanced Encryption Standard Instructions (AES-NI)
AES instruction set whitepaper (2.93 MiB, PDF) from Intel