AES instruction set

Short description: Instruction set extensions accelerating AES operations

An Advanced Encryption Standard instruction set (AES 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]

## Contents

* 1 x86 architecture processors
* 1.1 Instructions
* 1.2 Intel
* 1.3 AMD
* 2 Hardware acceleration in other architectures
* 2.1 x86 CPUs offering non-AES-NI acceleration interfaces
* 2.2 ARM architecture
* 2.3 RISC-V architecture
* 2.4 POWER architecture
* 2.5 IBM z/Architecture
* 2.6 Other architectures
* 3 Performance
* 4 Supporting software
* 5 Application beyond AES
* 6 See also
* 7 Notes
* 8 References
* 9 External 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.[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:
* Westmere-EP (a.k.a. Gulftown Xeon 5600-series DP server model) processors
* Clarkdale processors (except Core i3, Pentium and Celeron)
* Arrandale processors (except Celeron, Pentium, Core i3, Core i5-4XXM)
* Sandy Bridge processors:
* Desktop: all except Pentium, Celeron, Core i3[6][7]
* Mobile: all Core i7 and Core i5. Several vendors have shipped BIOS configurations with the extension disabled;[8] a BIOS update is required to enable them.[9]
* 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

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 ) 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:

* AMD Geode LX processors[15]
* VIA, using VIA PadLock[16][17]
* VIA C3 Nehemiah C5P (Eden-N) processors[18]
* VIA C7 Esther C5J processors[19]

### 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
* Allwinner
* A10, A20, A30, A31, A80, A83T, H3 and A64 using Security System[21]
* Broadcom
* BCM5801/BCM5805/BCM5820 using Security Processor[17]
* NXP Semiconductors
* i.MX6 onwards[22]
* Qualcomm
* Snapdragon 810 onwards[23]
* Rockchip
* RK30xx series onwards[24]
* Samsung
* Exynos 7 series onwards[25]

### 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:

* Dual-core RISC-V 64 bits Sipeed-M1 support AES and SHA256.[26]
* RISC-V architecture based ESP32-C (as well as Xtensa-based ESP32[27]), support AES, SHA, RSA, RNG, HMAC, digital signature and XTS 128 for flash.[28]
* Bouffalo Labs BL602/604 32-bit RISC-V supports various AES and SHA variants.[29]

### 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]

## 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

1. ↑ 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 i=3 and X[63:32] for i=1 only. Two parallel AES S-box substitutions Y0=SubWord(X1) and Y2=SubWord(X3) are used in AES-256 and 2 subexpressions Y1=RotWord(SubWord(X1))⊕rcon and Y3=RotWord(SubWord(X3))⊕rcon are used in AES-128, AES-192, AES-256.

## References

1. ↑ "Securing the Enterprise with Intel AES-NI". https://www.intel.in/content/dam/doc/white-paper/enterprise-security-aes-ni-white-paper.pdf.
2. ↑ "Intel Software Network". Intel. http://softwareprojects.intel.com/avx/.
3. ↑ "Intel Architecture Instruction Set Extensions and Future Features Programming Reference". Intel. https://software.intel.com/en-us/intel-architecture-instruction-set-extensions-programming-reference.
4. ↑ 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.
5. ↑ "Intel Product Specification Advanced Search". https://ark.intel.com/Search/FeatureFilter?productType=processors.
6. ↑ Shimpi, Anand Lal. "The Sandy Bridge Review: Intel Core i7-2600K, i5-2500K and Core i3-2100 Tested". http://www.anandtech.com/show/4083/the-sandy-bridge-review-intel-core-i5-2600k-i5-2500k-and-core-i3-2100-tested/2.
7. ↑ "Intel Product Specification Comparison". http://ark.intel.com/compare/53415,63913,58667,53480,53481,53482,53483,53484,53485,53490,53491,53492,53416,53414.
8. ↑ "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.
9. ↑ "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.
10. ↑ "Intel Core i3-2115C Processor (3M Cache, 2.00 GHz) Product Specifications". http://ark.intel.com/products/68332/Intel-Core-i3-2115C-Processor-(3MB-Cache-2_00-GHz).
11. ↑ "Intel Core i3-4000M Processor (3M Cache, 2.40 GHz) Product Specifications". http://ark.intel.com/products/75104/Intel-Core-i3-4000M-Processor-3M-Cache-2_40-GHz.
12. ↑ "Following Instructions". AMD. November 22, 2010. http://blogs.amd.com/work/2010/11/22/following-instructions/.
13. ↑ Dan Anderson (2011). "SPARC T4 OpenSSL Engine". Oracle. https://blogs.oracle.com/DanX/entry/sparc_t4_openssl_engine.
14. ↑ Richard Grisenthwaite (2011). "ARMv8-A Technology Preview". ARM. http://www.arm.com/files/downloads/ARMv8_Architecture.pdf.
15. ↑ "AMD Geode LX Processor Family Technical Specifications". AMD. https://www.amd.com/us/products/embedded/processors/geode-lx/Pages/geode-lx-processor-family-technical-specifications.aspx.
16. ↑ "VIA Padlock Security Engine". VIA. http://www.via.com.tw/en/initiatives/padlock/hardware.jsp#aes.
17. ↑ 17.0 17.1 Cryptographic Hardware Accelerators on OpenWRT.org
18. ↑ "VIA Eden-N Processors". VIA. http://www.via.com.tw/en/products/processors/eden-n/.
19. ↑ "VIA C7 Processors". VIA. http://www.via.com.tw/en/products/processors/c7/.
20. ↑ "Arm Architecture Reference Manual Armv8, for Armv8-A architecture profile". ARM. 22 January 2021. https://developer.arm.com/documentation/ddi0487/latest/.
21. ↑ "Security System/Crypto Engine driver status". http://sunxi.montjoie.ovh/.
22. ↑ "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.
23. ↑ "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.
24. ↑ "RK3128 - Rockchip Wiki". http://rockchip.wikidot.com/rk3128.
25. ↑ "The Samsung Exynos 7420 Deep Dive - Inside A Modern 14nm SoC". https://www.anandtech.com/show/9330/exynos-7420-deep-dive/2.
26. ↑ "Sipeed M1 Datasheet v1.1". 2019-03-06. https://download.kamami.pl/p578357-Sipeed-M1-Datasheet-V1.1.pdf.
27. ↑ "ESP32 Series Datasheet". 2021-03-19. https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf.
28. ↑ "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/.
29. ↑ "BL602-Bouffalo Lab (Nanjing) Co., Ltd.". https://www.bouffalolab.com/bl602.
30. ↑ "Power ISA Version 2.07 B". https://ibm.ent.box.com/s/jd5w15gz301s5b5dt375mshpq9c3lh4u.
31. ↑ "IBM System z10 cryptography". IBM. http://www-03.ibm.com/systems/z/advantages/security/z10cryptography.html.
32. ↑ "Using the XMEGA built-in AES accelerator". http://www.atmel.com/Images/doc8106.pdf.
33. ↑ "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.
34. ↑ P. Schmid and A. Roos (2010). "AES-NI Performance Analyzed". Tom's Hardware. http://www.tomshardware.com/reviews/clarkdale-aes-ni-encryption,2538.html.
35. ↑ T. Krovetz, W. Dai (2010). "How to get fast AES calls?". Crypto++ user group. https://groups.google.com/group/cryptopp-users/msg/a688203c2314ef08.
36. ↑ "Crypto++ 5.6.0 Pentium 4 Benchmarks". Crypto++ Website. 2009. http://www.cryptopp.com/benchmarks-p4.html.
37. ↑ "NonStop SSH Reference Manual". https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=c04179776.
38. ↑ "NonStop cF SSL Library Reference Manual". https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=c04833758.
39. ↑ "BackBox H4.08Tape Encryption Option". https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=c04203925.
40. ↑ "Intel Advanced Encryption Standard Instructions (AES-NI)". Intel. March 2, 2010. https://software.intel.com/en-us/articles/intel-advanced-encryption-standard-instructions-aes-ni/.
41. ↑ "AES-NI enhancements to NSS on Sandy Bridge systems". 2012-05-02. https://bugzilla.mozilla.org/show_bug.cgi?id=706024.
42. ↑ "System Administration Guide: Security Services, Chapter 13 Solaris Cryptographic Framework (Overview)". Oracle. September 2010. http://docs.oracle.com/cd/E19253-01/816-4557/scf-1/index.html.
43. ↑ "FreeBSD 8.2 Release Notes". FreeBSD.org. 2011-02-24. http://www.freebsd.org/releases/8.2R/relnotes.html.
44. ↑ OpenSSL: CVS Web Interface
45. ↑ "Cryptographic Backend (GnuTLS 3.6.14)". https://gnutls.org/manual/html_node/Cryptographic-Backend.html.
46. ↑ "AES-GCM in libsodium". https://download.libsodium.org/doc/secret-key_cryptography/aead#aes-256-gcm.
47. ↑ "Hardware Acceleration". https://www.veracrypt.fr/en/Hardware Acceleration.html.
48. ↑ "aes - The Go Programming Language". https://golang.org/pkg/crypto/aes/.
49. ↑ Shimpi, Anand Lal. "The Clarkdale Review: Intel's Core i5 661, i3 540 & i3 530". https://www.anandtech.com/show/2901.
50. ↑ "Bloombase StoreSafe Intelligent Storage Firewall". https://marketplace.intel.com/s/offering/a5b3b0000004dBTAAY/bloombase-storesafe-intelligent-storage-firewall.
51. ↑ "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.
52. ↑ 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.
53. ↑ Kivilinna, Jussi (2013). Block Ciphers: Fast Implementations on x86-64 Architecture (PDF) (M.Sc.). University of Oulu. pp. 33, 42. Retrieved 2017-06-22.
54. ↑ Yoo, Tae-Hee; Kivilinna, Jussi; Cho, Choong-Hee (2023). "AVX-Based Acceleration of ARIA Block Cipher Algorithm". IEEE Access 11: 77403–77415. doi:10.1109/ACCESS.2023.3298026. Bibcode: 2023IEEEA..1177403Y.
55. ↑ 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."
56. ↑ Wu, Hongjun; Preneel, Bart. "AEGIS: A Fast Authenticated Encryption Algorithm (v1.1)". https://competitions.cr.yp.to/round3/aegisv11.pdf.
57. ↑ Denis, Frank. "The AEGIS Family of Authenticated Encryption Algorithms" (in en). https://cfrg.github.io/draft-irtf-cfrg-aegis-aead/draft-irtf-cfrg-aegis-aead.html.

## External links

* Intel Advanced Encryption Standard Instructions (AES-NI)
* AES instruction set whitepaper (2.93 MiB, PDF) from Intel

* v
* t
* e

AMD technology

Software|

* AMD Radeon Software
* AGESA
* AMDGPU

Platforms|

* Spider
* Dragon
* Horus

Technology|

* Cool'n'Quiet
* High Bandwidth Memory
* PowerNow!
* PowerPlay
* PowerTune
* Turbo Core
* ASTC
* AMD Wraith

Instructions|

* X86-64
* 3DNow!
* AVX
* XOP
* CVT16/F16C
* FMA
* FMA3
* FMA4
* BMI
* ABM
* BMI1
* TBM
* SSE5
* ASF
* AES

* v
* t
* e

Intel technology

Platforms|

* Centrino
* Centrino 2
* Viiv
* MID
* Tablet
* CULV
* Ultrabook
* Skulltrail
* NUC
* Galileo
* Edison
* Curie

Discontinued|

* Common Building Block
* MultiProcessor Specification
* Intel Communication Streaming Architecture
* Intel Inboard 386
* Intel Play
* MMC-1
* MMC-2

Current|

* Advanced Programmable Interrupt Controller
* Intel Turbo Boost
* vPro
* Intel Secure Key
* Intel Management Engine
* Active Management Technology
* AMT versions
* High-bandwidth Digital Content Protection
* High Definition Audio
* Hub Architecture
* Rapid Storage Technology
* Enhanced SpeedStep
* Serial Digital Video Out
* Host Embedded Controller Interface
* Hyper-threading
* Omni-Path
* Platform Environment Control Interface
* QuickPath Interconnect
* Platform Controller Hub
* System Management Bus
* Thunderbolt
* Ultra Path Interconnect

Upcoming|

* Silicon Photonics Link

Template:Instruction set extensions

* v
* t
* e

Block ciphers (security summary)

Common
algorithms|

* AES
* Blowfish
* DES (internal mechanics, Triple DES)
* Serpent
* Twofish

Less common
algorithms|

* Camellia
* CAST-128
* GOST
* IDEA
* RC2
* RC5
* RC6
* SEED
* ARIA
* Skipjack
* TEA
* XTEA

Other
algorithms|

* 3-Way
* Akelarre
* Anubis
* BaseKing
* BassOmatic
* BATON
* BEAR and LION
* CAST-256
* Chiasmus
* CIKS-1
* CIPHERUNICORN-A
* CIPHERUNICORN-E
* CLEFIA
* CMEA
* Cobra
* COCONUT98
* Crab
* Cryptomeria/C2
* CRYPTON
* CS-Cipher
* DEAL
* DES-X
* DFC
* E2
* FEAL
* FEA-M
* FROG
* G-DES
* Grand Cru
* Hasty Pudding cipher
* Hierocrypt
* ICE
* IDEA NXT
* Intel Cascade Cipher
* Iraqi
* Kalyna
* KASUMI
* KeeLoq
* KHAZAD
* Khufu and Khafre
* KN-Cipher
* Kuznyechik
* Ladder-DES
* Libelle
* LOKI (97, 89/91)
* Lucifer
* M6
* M8
* MacGuffin
* Madryga
* MAGENTA
* MARS
* Mercy
* MESH
* MISTY1
* MMB
* MULTI2
* MultiSwap
* New Data Seal
* NewDES
* Nimbus
* NOEKEON
* NUSH
* PRESENT
* Prince
* Q
* RC6
* REDOC
* Red Pike
* S-1
* SAFER
* SAVILLE
* SC2000
* SHACAL
* SHARK
* Simon
* SM4
* Speck
* Spectr-H64
* Square
* SXAL/MBAL
* Threefish
* Treyfer
* UES
* xmx
* XXTEA
* Zodiac

Design|

* Feistel network
* Key schedule
* Lai–Massey scheme
* Product cipher
* S-box
* P-box
* SPN
* Confusion and diffusion
* Avalanche effect
* Block size
* Key size
* Key whitening (Whitening transformation)

Attack
(cryptanalysis)|

* Brute-force (EFF DES cracker)
* MITM
* Biclique attack
* 3-subset MITM attack
* Linear (Piling-up lemma)
* Differential
* Impossible
* Truncated
* Higher-order
* Differential-linear
* Distinguishing (Known-key)
* Integral/Square
* Boomerang
* Mod n
* Related-key
* Slide
* Rotational
* Side-channel
* Timing
* Power-monitoring
* Electromagnetic
* Acoustic
* Differential-fault
* XSL
* Interpolation
* Partitioning
* Rubber-hose
* Black-bag
* Davies
* Rebound
* Weak key
* Tau
* Chi-square
* Time/memory/data tradeoff

Standardization|

* AES process
* CRYPTREC
* NESSIE

Utilization|

* Initialization vector
* Mode of operation
* Padding

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/AES instruction set. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=AES_instruction_set&oldid=3983302"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template