| October 9, 2010 11:00 PM PDT | |
Introduction
AES (Advanced Encryption Standard) is an encryption standard adopted by the U.S. government starting in 2001. It is widely used across the software ecosystem to protect network traffic, personal data, and corporate IT infrastructure. AES is a symmetric block cipher that encrypts/decrypts data through several rounds. The new 2010 Intel® Core™ processor family (code name Westmere) includes a set of new instructions, Intel® Advanced Encryption Standard (AES) New Instructions (AES-NI). The instructions were designed to implement some of the complex and performance intensive steps of the AES algorithm using hardware and thus accelerating the execution of the AES algorithms. AES-NI can be used to accelerate the performance of an implementation of AES by 3 to 10x over a completely software implementation.The AES algorithm works by encrypting a fixed block size of 128 bits of plain text in several rounds to produce the final encrypted cipher text. The number of rounds (10, 12, or 14) used depends on the key length (128b, 192b, or 256b). Each round performs a sequence of steps on the input state, which is then fed into the following round. Each round is encrypted using a subkey that is generated using a key schedule. For more details on AES please refer to [1].
The new AES-NI instruction set is comprised of six new instructions that perform several compute intensive parts of the AES algorithm. These instructions can execute using significantly less clock cycles than a software solution. Four of the new instructions are for accelerating the encryption/decryption of a round and two new instructions are for round key generation. The following is a description of the new instructions.
- AESENC. This instruction performs a single round of encryption. The instruction combines the four steps of the AES algorithm - ShiftRows, SubBytes, MixColumns & AddRoundKey into a single instruction.
- AESENCLAST. Instruction for the last round of encryption. Combines the ShiftRows, SubBytes, & AddRoundKey steps into one instruction.
- AESDEC. Instruction for a single round of decryption. This combines the four steps of AES - InvShiftRows, InvSubBytes, InvMixColumns, AddRoundKey into a single instruction
- AESDECLAST. Performs last round of decryption. It combines InvShiftRows, InvSubBytes, AddRoundKey into one instruction.
- AESKEYGENASSIST is used for generating the round keys used for encryption.
- AESIMC is used for converting the encryption round keys to a form usable for decryption using the Equivalent Inverse Cipher.
Benefits of using AES-NI
Performance ImprovementThe performance improvement expected with the use of AES-NI would depend on the applications and how much of the application time is spent in encryption and decryption. At the algorithm level, using AES-NI can provide significant speedup of AES. For non-parallel modes of AES operation such as CBC-encrypt AES-NI can provide a 2-3 fold gain in performance over a completely software approach. For parallelizable modes such as CBC-decrypt and CTR, AES-NI can provide a 10x improvement over software solutions. For details on performance please refer to [3].
Intel continues to provide leadership in developing instruction- set extensions with recently released ISA support for Advanced Encryption Standard (AES). This paper presents the excellent performance of the AES algorithm on the Intel® Core™ i7 Processor Extreme Edition, i7-980X, using the AES New Instructions (AES-NI). Performance results for serial and parallel modes of operation are provided for all key sizes, for variable numbers of cores and threads. These results have been achieved using highly optimized implementations of the AES functions that can achieve ~1.3 cycles/byte on a single-core Intel® Core™ i7 Processor Extreme Edition, i7-980X for AES-128 in parallel modes. The paper also has a brief description of how to code to achieve these results and a reference to the complete source code. (Read "Breakthrough AES Performance with Intel® AES New Instructions" White Paper in its entirety.)
Improved Security
Beyond improving performance, the new instructions help address recently discovered side channel attacks on AES. AES-NI instructions perform the decryption and encryption completely in hardware without the need for software lookup tables. Therefore using AES-NI can lower the risk of side-channel attacks as well as greatly improve AES performance. For details please refer to [3].
Using AES-NI
AES-NI instructions can be used in any application that uses AES for encryption. AES is very widely used in several applications such as network encryption, disk and file encryption applications. File-level and disk encryption applications use AES to protect data stored on a disk. Networking applications use encryption to protect data in flight with protocols encompassing SSL, TLS, IPsec, HTTPS, FTP, SSH, etc.There are several ways to take advantage of AES-NI in your applications, whether you are starting from scratch or optimizing existing applications. The following shows several methods for using AES-NI.
Using Standard Libraries
If you are using existing crypto libraries that provide the crypto functionalities including AES, all you need to do is recompile your applications to include the latest libraries. The following table shows the list of libraries and versions that are optimized to take advantage of AES-NI.
| Library | Description | Version supporting AES-NI |
| Open SSL | Open source library implementation of SSL and TLS. Supports several cryptographic functions including AES | Direct support in V1.0 (experimental version) 0.9.8k or later via patch |
| Intel ® Integrated Performance Primitives (IPP) crypto | Extensive library of multicore-ready, highly optimized implementations of several cryptographic algorithms including AES. | V6.1 or later |
| Microsoft* Cryptography API: Next Generation1 | APIs included with Microsoft* Operating systems provides cryptographic services to applications. | Windows 7 |
Using C/C++ or assembly
If you have existing C/C++ or assembly implementations of AES algorithms you can take advantage of the support provided in most of the standard compiler development tools. You will need to modify your code to replace code blocks with the equivalent AES-NI instructions. AES-NI instructions can be called from C/C++ either using inline assembly or using special functions know as intrinsics. Each intrinsic maps to one of the new instructions. Using intrinsics allows you to develop code using the syntax of C/C++ function calls and variables instead of inline assembly language.
To use AES-NI in assembly language you can directly call the relevant instruction from your code.
The following compilers provide C/C++ as well assembly support for AES-NI.
| Compiler | Description | Version supporting AES-NI |
| Gcc/g++ | Open source GNU compiler for C/C++ | 4.4 or later |
| Intel® C/C++ compiler | Intel compiler tools for C/C+ | 11.1 or later |
| Microsoft* Visual C++ | C/C++ compiler tools for Windows* operating systems | 2008 SP1 or later |
Additional Links
[1] Advanced Encryption Standard (AES) - http://en.wikipedia.org/wiki/Advanced_Encryption_Standard[2] Intel ® Performance Primitives (IPP) web page - http://software.intel.com/en-us/intel-ipp/
[3] White Paper on AES-NI - http://software.intel.com/en-us/articles/intel-advanced-encryption-standard-aes-instructions-set/
[4] Intel® C/C++ compiler - http://software.intel.com/en-us/intel-compilers/
[5] Download the Intel® AES-NI Sample Library v1.2
[6] OpenSSL libraries - http://www.openssl.org/
[7] White Paper - "Securing the Enterprise with Intel® AES-NI" - http://www.intel.com/Assets/en_US/PDF/whitepaper/323587.pdf
[8] White Paper - "Breakthrough AES Performance with Intel® AES New Instructions" - http://software.intel.com/file/27067/
1 Note the Microsoft* Crypto API that preceded the Microsoft* Crypto API: Next Generation is not optimized for AES-NI.
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (17) 
| March 26, 2010 4:09 AM PDT
Gennady Fedorov (Intel)
| AES NI available in IPP since version 6.1 Update2 |
| April 23, 2010 5:33 AM PDT
Himanshu | Actually had a query - Can anyone please share the more details on Intel AES technology. A link to PDF/ whitepaper would be of great help.Thanx |
| May 4, 2010 11:27 AM PDT
Kathy Farrel (Intel)
| Himanshu - here is a link to our newest AES-NI White Paper: http://software.intel.com/file/26898 - I just posted it today! |
| June 5, 2010 12:26 PM PDT
Kathy Farrel (Intel)
|
Himanshu, I just revise this document to include the 9th link at the bottom. That page contains a .pdf that you'll want to download. Let me know if you have questions. Kathy |
| June 5, 2010 12:28 PM PDT
Kathy Farrel (Intel)
|
Oops - The link I just posted was a duplicate. Himanshu - the third of the "Additional Links" contains the info you were asking for. Sorry for the error. Kathy |
| June 7, 2010 10:52 AM PDT
Evelynn | When is link 5 coming out? |
| July 9, 2010 6:38 AM PDT
JT_Zhou
|
Hi, Microsoft CNG API for Windows 7 supports the AES-NI instructions set. If I have an application built with CNG API. Will it be still able to leverage the AES-NI instructions set in Hyper-V virtual machine? Regards, JT |
| August 6, 2010 11:59 PM PDT
noloader |
OpenSSL is probably feeling a but lonely since it is the only open source library listed. Crypto++ 5.6.1 also uses the Intel/AMD AES-NI instruction set. See "Crypto++ 5.6.1 release candidate", http://groups.google.com/group/cryptopp-users/browse_thread/.....e49c24b7e5. JW |
| October 27, 2010 3:24 PM PDT
Palio India | Are there any plans to bring out any new Core i7 processors in mid range price range with this technology? |
| December 24, 2010 12:28 AM PST
danx
|
I have a blog article on the use of Intel AES-NI in Oracle's Sun Solaris Operating System to improve performance. Briefly, it's faster :-) and AES-NI is used and supported on Oracle Solaris 11 Express 2010.11 and on Solaris 10 10/09 (aka update 8). It's at http://blogs.sun.com/DanX/entry/intel_aes_ni_optimization_on Intel has code samples in the whitepaper and at http://software.intel.com/en-us/articles/download-the-intel-.....e-library/ Samples are also in the OpenSSL library, http://www.openssl.org/source/ and you can see use in Solaris at http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/sr..... es_intel.s |
| August 8, 2011 8:05 AM PDT
Tasman Hayes
|
Hi. Thanks for the excellent info! Great to see support for AES-NI has been rolled into OpenSSL. I'm curating an article on MacBook Air i5 vs i7 at http://maccrazy.com/macbook-air-2011-i5-vs-i7-is-the-upgrade-worth-it I'd like to ask a few questions to go into this and other MacBook Air articles at http://maccrazy.com A common question is "Is it worth upgrading from a previous generation MacBook Air with a Core 2 Duo, to the current generation running Core series chips?" The i5 & i7 processors in the new 2011 MacBook Air's are ultra-low voltage Sandy Bridge CPUs. Apple has released new full hard disk encryption software, called FileVault 2, with its latest OS, Mac OS X 10.7 Lion. Can I confirm whether these CPUs have AES-NI support? Do you know if FileVault 2 uses the AES-NI instruction set? Many thanks for information or leads! |
| September 21, 2011 2:03 PM PDT
danx
|
@Tasman Hayes Not all Westmere or Sandy Bridge-class processors have AES-NI. In general, the lower-power mobile processors do not have AES-NI. For example, Core i3 does not have AES-NI. Low-end mobile Core i7 processors 2630QM and 2635QM does not have AES-NI. Most other Core i5/i7 processors have AES-NI. I don't know what processor MacBook Air uses, but get the processor number and look it up in http://ark.intel.com/ Each processor has a spec sheet and clearly shows whether it supports AES-NI (among other features). Remember, few things are free--you can have low power or lots of hardware features, but not both. As for upgrading, I think longer battery life would make a upgrade worth while. I wouldn't upgrade my working laptop just for a faster processor, unless it's running slow or I'm doing weird stuff that needs the speed. Laptops seem to break soon enough through regular use. |
| November 8, 2011 6:48 AM PST
Az7 |
@danx IA AES Extensions are supported & already enabled on my (low power) Intel Core i7-2630QM. |
| November 11, 2011 7:30 PM PST
danx
| @Az7: Great news. It's good to hear some of the power-friendlier Sandy Bridge processors can handle the delicate balance of both low power and full processor features. |
| January 18, 2012 8:41 AM PST
Mham | Is AES-NI available for Ketkey for use in OpenSWAN or strongSWAN? |
| January 29, 2012 8:28 PM PST
faisal imtiaz | hello every body...nice to see this platform knowing a lot about AES ... i want to implemement AES on Fpga ...i am new and need help..any one can suggest me refernce material or tips etc ... |
Trackbacks (53)
- Lots of New Content Available this Week – Become a new Manageability Blogger and Receive a Free Book – Intel Software Network Blogs
April 19, 2010 4:05 PM PDT - What’s the deal with CPU names? « Fortify Technologies' Blog
July 17, 2010 5:24 PM PDT - TrueCrypt 7.0
July 25, 2010 12:59 PM PDT - AES-NI and Rekeying Database Encryption Keys « Sean ONeill's Identity Crisis
February 8, 2011 11:17 AM PST - Chip Shot: Say it with Servers: New Xeon Chips Bolster Performance and Security | ServerGround.net
February 14, 2011 12:58 PM PST - Wanted: Native JS Encryption | Robert Accettura's Fun With Wordage
March 3, 2011 8:44 AM PST - TrueCrypts prestanda | Kryptering - Information och nyheter om krypto
May 5, 2011 2:19 AM PDT - AES-NI Encryption Acceleration | saliano.net
May 17, 2011 12:03 AM PDT - AES-NI Crypto Acceleration | saliano.net
May 17, 2011 12:05 AM PDT - eletrochicche
August 18, 2011 5:16 AM PDT - Snake Oil in Cryptography – SSL Does Not Imply Good Key Management (Part 2) » Tragedy Ecstasy Doom
August 26, 2011 3:49 AM PDT - AES Counter Mode details (Intel AES-NI implementation) – Blogs - Intel® Software Network
November 11, 2011 7:27 AM PST - AES Counter Mode details (Intel AES-NI implementation) | ServerGround.net
November 11, 2011 9:03 AM PST - Howto: Tresor unter Ubuntu 11.10 verwenden
January 9, 2012 7:27 AM PST - Thank you Asus! « Slightly less Random Ramblings
January 10, 2012 2:56 AM PST - AES-NI in Laymen’s Terms – Blogs - Intel® Software Network
January 11, 2012 6:18 PM PST - AES-NI in Laymen’s Terms | ServerGround.net
January 11, 2012 7:40 PM PST - Balancing Convenience, Redundancy, and Data Security in a NAS-driven Environment « cmu95752
January 31, 2012 5:53 AM PST - Intel® Advanced Encryption Standard – AES Instructions - java在路上
February 16, 2012 4:18 PM PST -
Intel intros Xeon E5-2600 family, finally ushers servers into the Sandy Bridge era | Best Smartphone Blogging
March 6, 2012 10:56 AM PST - Intel intros Xeon E5-2600 family, finally ushers servers into the Sandy Bridge era
March 6, 2012 11:00 AM PST - Intel intros Xeon E5-2600 family, finally ushers servers into the Sandy Bridge era | News Today World
March 6, 2012 11:25 AM PST - Intel intros Xeon E5-2600 family, finally ushers servers into the Sandy Bridge era | Fix Twit
March 6, 2012 12:00 PM PST - New Sandy Bridge based Intel Xeon chips | TechSwerve
March 6, 2012 12:11 PM PST - New Intel Server Technology: Powering the Cloud to Handle 15 Billion Connected Devices | Your Ultimate Resources
March 6, 2012 12:42 PM PST - Intel intros Xeon E5-2600 family, finally ushers servers into the Sandy Bridge era | Gaster Tech Blog
March 6, 2012 12:50 PM PST - United Data Technologies (UDT) Among the First to Deploy Intel’s Versatile New Data Center Capabilities « Contacto Latino News
March 6, 2012 1:04 PM PST - Intel intros Xeon E5-2600 family, finally ushers servers into the Sandy Bridge era | Top Mobile Accessories
March 6, 2012 2:22 PM PST - Intel intros Xeon E5-2600 family, finally ushers servers into the Sandy Bridge era | PRO-BTC
March 6, 2012 2:43 PM PST - | Nokia-New.Ru
March 6, 2012 2:44 PM PST - New Intel Server Technology: Powering the Cloud to Handle 15 Billion Connected Devices | Enterprise Communications and Collaboration Technologies
March 6, 2012 3:21 PM PST - Intel intros Xeon E5-2600 family, finally ushers servers into the Sandy Bridge era | Brian's Blog Site
March 7, 2012 2:54 AM PST - Intel intros Xeon E5-2600 family, finally ushers servers into the Sandy Bridge era | BiZZBo@rd | Find People Who Share Your Business.
March 7, 2012 3:31 AM PST - Cloud: Alimentación de la nube para manejar 15 millones de dispositivos conectados | Paralelizados.com
March 7, 2012 4:24 AM PST - Opiso.technology » New Intel Server Technology: Powering the Cloud to Handle 15 Billion Connected Devices
March 8, 2012 5:18 AM PST - Kelser among the first companies to introduce Universal Intels new server processors. | sikeresebbelet.info
March 9, 2012 9:32 PM PST - Kelser Corporation Among First to Introduce Intels Versatile New Server Processors. – 3/15/2012 – Digital & Photography Gadgets | WhichGadget.org
March 15, 2012 11:43 AM PDT -
อินเทลเปิดตัวเทคโนโลยีเซิร์ฟเวอร์เชื่อมต่ออุปกรณ์บนคลาวด์มากถึง 1.5 หมื่นล้านชิ้น | Vmodtech.com | R
March 15, 2012 10:51 PM PDT - PKA Technologies and Intel Set to use the new universal server processors | sikeresebbelet.info
March 17, 2012 1:31 PM PDT - Intel’s New Xeon Chip Set to Storm the Clouds | CloudTweaks.com - Cloud Computing Community
March 19, 2012 5:10 AM PDT - PKA Technologies and Intel Set To Deploy Versatile New Server Processors | Computech
March 21, 2012 10:32 AM PDT - PKA Technologies and Intel Set To Deploy Versatile New Server Processors - My Computer
March 21, 2012 11:27 PM PDT - Kelser Corporation Among First to Introduce Intels Versatile New Server Processors. | MK Computing
March 22, 2012 9:32 AM PDT - PKA Technologies and Intel Set To Deploy Versatile New Server Processors
March 31, 2012 8:31 PM PDT - PKA Technologies and Intel Set To Deploy Versatile New Server Processors
April 3, 2012 7:43 AM PDT - PKA Technologies and Intel Set To Deploy Versatile New Server Processors
April 3, 2012 7:32 PM PDT - PKA Technologies and Intel Set To Deploy Versatile New Server Processors | How to speed up my computer?
April 4, 2012 4:16 PM PDT - PKA Technologies and Intel Set To Deploy Versatile New Server Processors
April 6, 2012 6:32 PM PDT - PKA Technologies and Intel Set To Deploy Versatile New Server Processors
April 6, 2012 10:34 PM PDT - PKA Technologies and Intel Set To Deploy Versatile New Server Processors
April 7, 2012 4:31 PM PDT -
jaimev.training.yourcmsexperts.com» Blog Archive
» Nueva tecnología de Intel para servidores
April 9, 2012 12:56 PM PDT - Intel® Xeon® E5-2600 Data Centers más flexibles y eficientes | Portal de Noticias de la Revista IT/USERS
April 28, 2012 5:50 AM PDT - Encrypt USB disk drive with DiskCryptor
May 5, 2012 12:09 AM PDT
Leave a comment 
To obtain technical support, please go to Software Support.
Author
Jeffrey Rott (Intel)
|




Dan Anderson