diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-04-07 10:31:23 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-04-07 10:41:15 +0200 |
commit | f1ff2ffbc8fb5fa9c89b09519e3951fab55d7af1 (patch) | |
tree | 638c4b1805dc9da467b2433c4642efeaf15a2ea2 /lib/accelerated | |
parent | d143532e37a7750688fe74c84159d7caa501e16c (diff) | |
download | gnutls-f1ff2ffbc8fb5fa9c89b09519e3951fab55d7af1.tar.gz |
Added CCM-8 ciphersuites
Diffstat (limited to 'lib/accelerated')
-rw-r--r-- | lib/accelerated/x86/aes-ccm-x86-aesni.c | 4 | ||||
-rw-r--r-- | lib/accelerated/x86/x86-common.c | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/lib/accelerated/x86/aes-ccm-x86-aesni.c b/lib/accelerated/x86/aes-ccm-x86-aesni.c index a1fac447b0..8247580aa0 100644 --- a/lib/accelerated/x86/aes-ccm-x86-aesni.c +++ b/lib/accelerated/x86/aes-ccm-x86-aesni.c @@ -75,7 +75,9 @@ aes_ccm_cipher_init(gnutls_cipher_algorithm_t algorithm, void **_ctx, { /* we use key size to distinguish */ if (algorithm != GNUTLS_CIPHER_AES_128_CCM && - algorithm != GNUTLS_CIPHER_AES_256_CCM) + algorithm != GNUTLS_CIPHER_AES_256_CCM && + algorithm != GNUTLS_CIPHER_AES_128_CCM_8 && + algorithm != GNUTLS_CIPHER_AES_256_CCM_8) return GNUTLS_E_INVALID_REQUEST; *_ctx = gnutls_calloc(1, sizeof(ccm_x86_aes_ctx)); diff --git a/lib/accelerated/x86/x86-common.c b/lib/accelerated/x86/x86-common.c index 6c4eb53786..0f355cc411 100644 --- a/lib/accelerated/x86/x86-common.c +++ b/lib/accelerated/x86/x86-common.c @@ -543,6 +543,22 @@ void register_x86_intel_crypto(unsigned capabilities) gnutls_assert(); } + ret = + gnutls_crypto_single_cipher_register + (GNUTLS_CIPHER_AES_128_CCM_8, 80, + &_gnutls_aes_ccm_x86_aesni, 0); + if (ret < 0) { + gnutls_assert(); + } + + ret = + gnutls_crypto_single_cipher_register + (GNUTLS_CIPHER_AES_256_CCM_8, 80, + &_gnutls_aes_ccm_x86_aesni, 0); + if (ret < 0) { + gnutls_assert(); + } + #ifdef ASM_X86_64 if (check_pclmul()) { /* register GCM ciphers */ |