summaryrefslogtreecommitdiff
path: root/lib/accelerated/x86/aes-gcm-x86-ssse3.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/accelerated/x86/aes-gcm-x86-ssse3.c')
-rw-r--r--lib/accelerated/x86/aes-gcm-x86-ssse3.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/accelerated/x86/aes-gcm-x86-ssse3.c b/lib/accelerated/x86/aes-gcm-x86-ssse3.c
index 5580cc2214..f6b14681c9 100644
--- a/lib/accelerated/x86/aes-gcm-x86-ssse3.c
+++ b/lib/accelerated/x86/aes-gcm-x86-ssse3.c
@@ -69,6 +69,14 @@ static void x86_aes_128_set_encrypt_key(void *_ctx,
vpaes_set_encrypt_key(key, 16*8, ctx);
}
+static void x86_aes_192_set_encrypt_key(void *_ctx,
+ const uint8_t * key)
+{
+ AES_KEY *ctx = _ctx;
+
+ vpaes_set_encrypt_key(key, 24*8, ctx);
+}
+
static void x86_aes_256_set_encrypt_key(void *_ctx,
const uint8_t * key)
{
@@ -83,6 +91,7 @@ aes_gcm_cipher_init(gnutls_cipher_algorithm_t algorithm, void **_ctx,
{
/* we use key size to distinguish */
if (algorithm != GNUTLS_CIPHER_AES_128_GCM &&
+ algorithm != GNUTLS_CIPHER_AES_192_GCM &&
algorithm != GNUTLS_CIPHER_AES_256_GCM)
return GNUTLS_E_INVALID_REQUEST;
@@ -103,6 +112,9 @@ aes_gcm_cipher_setkey(void *_ctx, const void *key, size_t keysize)
if (keysize == 16) {
GCM_SET_KEY(ctx, x86_aes_128_set_encrypt_key, x86_aes_encrypt,
key);
+ } else if (keysize == 24) {
+ GCM_SET_KEY(ctx, x86_aes_192_set_encrypt_key, x86_aes_encrypt,
+ key);
} else if (keysize == 32) {
GCM_SET_KEY(ctx, x86_aes_256_set_encrypt_key, x86_aes_encrypt,
key);