About This Paper
This paper describes how to optimize the Advanced Encryption Standard (AES) algorithm for the Intel® Pentium® 4 processor. A brief overview of the original AES code precedes a description of how to improve the performance of AES using the Intel® C++ Compiler. Lastly, potential drawbacks of coding AES in assembly language are discussed.
by Andrew Binstock
The Pentium® 4 processor's Streaming SIMD Extensions 2 (SSE-2) are new processor instructions designed to accelerate the performance of applications that use double-precision floating point and integer instructions. These instructions are particularly important in applications that rely on:
When targeting x64 platforms in Visual Studio .NET* 2005, programmers are no longer able to use inline assembly code as they did for 32-bit code. This forces the programmer to either rely on C/C++ code using intrinsics, or to tediously create a 64-bit MASM (.asm) version of the function. Unfortunately, the VS .Net 2005 implementation of the intrinsic for CPUID (__cpuid) recognizes only input arguments in the register eax, and not the more recently defined inputs in ecx, which are required for queries regarding cache parameters and certain multi-core characteristics.