diff options
author | David Benjamin <davidben@chromium.org> | 2014-08-20 14:19:54 -0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-08-20 20:53:31 +0000 |
commit | 5213df4e9ed9ca130c40f142893cb91f2e18eee1 (patch) | |
tree | cd317a619f5a9efa8c575b4a38e068164db7d5dd /include/openssl | |
parent | 92909a6206037f8266d93979028215a8b7f20614 (diff) | |
download | src-5213df4e9ed9ca130c40f142893cb91f2e18eee1.tar.gz |
Prefer AES-GCM when hardware support is available.
BUG=396787
Change-Id: I72ddb0ec3c71dbc70054403163930cbbde4b6009
Reviewed-on: https://boringssl-review.googlesource.com/1581
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'include/openssl')
-rw-r--r-- | include/openssl/aead.h | 4 | ||||
-rw-r--r-- | include/openssl/cpu.h | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/include/openssl/aead.h b/include/openssl/aead.h index 7e4682c..6f66e9c 100644 --- a/include/openssl/aead.h +++ b/include/openssl/aead.h @@ -115,6 +115,10 @@ OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_128_key_wrap(); * See |EVP_aead_aes_128_key_wrap| for details. */ OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_256_key_wrap(); +/* EVP_has_aes_hardware returns one if we enable hardware support for fast and + * constant-time AES-GCM. */ +OPENSSL_EXPORT int EVP_has_aes_hardware(void); + /* TLS specific AEAD algorithms. * diff --git a/include/openssl/cpu.h b/include/openssl/cpu.h index bec157f..3cc1e5e 100644 --- a/include/openssl/cpu.h +++ b/include/openssl/cpu.h @@ -79,7 +79,10 @@ extern "C" { * Index 1: * ECX for CPUID where EAX = 1 * Index 2: - * EBX for CPUID where EAX = 7 */ + * EBX for CPUID where EAX = 7 + * + * Note: the CPUID bits are pre-adjusted for the OSXSAVE bit and the YMM and XMM + * bits in XCR0, so it is not necessary to check those. */ extern uint32_t OPENSSL_ia32cap_P[4]; #endif |