aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-10 05:40:36 +0000
committerlloyd <[email protected]>2009-11-10 05:40:36 +0000
commit651c74a712a52095206a9a7dea547c6b56b036d8 (patch)
tree2ca7a6713a8170bd3b6a207a88ca0e5c5fefb999
parentefb27197897d2873289bc4e1089385421171076b (diff)
Make the AES implementation using Intel's AES instruction extension official;
testing with Intel's emulator shows all green.
-rw-r--r--doc/examples/cpuid.cpp1
-rw-r--r--doc/log.txt1
-rw-r--r--src/block/aes_intel/aes_intel.cpp10
-rw-r--r--src/block/aes_intel/aes_intel.h4
4 files changed, 9 insertions, 7 deletions
diff --git a/doc/examples/cpuid.cpp b/doc/examples/cpuid.cpp
index 1bdee787c..30ac4d676 100644
--- a/doc/examples/cpuid.cpp
+++ b/doc/examples/cpuid.cpp
@@ -12,6 +12,7 @@ int main()
printf("SSSE3 %d\n", CPUID::has_ssse3());
printf("SSE41 %d\n", CPUID::has_sse41());
printf("SSE42 %d\n", CPUID::has_sse42());
+ printf("AES-NI %d\n", CPUID::has_intel_aes());
printf("AltiVec %d\n", CPUID::has_altivec());
}
diff --git a/doc/log.txt b/doc/log.txt
index f1c58be71..cd97089e1 100644
--- a/doc/log.txt
+++ b/doc/log.txt
@@ -2,6 +2,7 @@
* 1.9.3-dev, ????-??-??
- Allow use of any hash function in X.509 certificate creation
- Set macros for available SIMD instructions in build.h
+ - Add AES-128 using Intel AES instruction intrinsics
* 1.9.2, 2009-11-03
- Add SIMD version of XTEA
diff --git a/src/block/aes_intel/aes_intel.cpp b/src/block/aes_intel/aes_intel.cpp
index 057728e72..fb71a5d89 100644
--- a/src/block/aes_intel/aes_intel.cpp
+++ b/src/block/aes_intel/aes_intel.cpp
@@ -1,6 +1,6 @@
/**
-* AES
-* (C) 1999-2009 Jack Lloyd
+* AES using Intel's AES-NI instructions
+* (C) 2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
@@ -24,7 +24,7 @@ __m128i aes_128_key_expansion(__m128i key, __m128i key_with_rcon)
}
/**
-* AES Encryption
+* AES-128 Encryption
*/
void AES_128_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
{
@@ -70,7 +70,7 @@ void AES_128_Intel::encrypt_n(const byte in[], byte out[], u32bit blocks) const
}
/**
-* AES Decryption
+* AES-128 Decryption
*/
void AES_128_Intel::decrypt_n(const byte in[], byte out[], u32bit blocks) const
{
@@ -116,7 +116,7 @@ void AES_128_Intel::decrypt_n(const byte in[], byte out[], u32bit blocks) const
}
/**
-* AES Key Schedule
+* AES-128 Key Schedule
*/
void AES_128_Intel::key_schedule(const byte key[], u32bit length)
{
diff --git a/src/block/aes_intel/aes_intel.h b/src/block/aes_intel/aes_intel.h
index 90270939c..052b37bb2 100644
--- a/src/block/aes_intel/aes_intel.h
+++ b/src/block/aes_intel/aes_intel.h
@@ -1,6 +1,6 @@
/**
-* AES using Intel's AES instructions
-* (C) 1999-2009 Jack Lloyd
+* AES using Intel's AES-NI instructions
+* (C) 2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/