1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Add aesni_crypt_ecb() and use it

This commit is contained in:
Manuel Pégourié-Gonnard
2013-12-18 11:45:21 +01:00
parent 92ac76f9db
commit 5b685653ef
4 changed files with 70 additions and 1 deletions

View File

@ -37,6 +37,9 @@
#if defined(POLARSSL_PADLOCK_C)
#include "polarssl/padlock.h"
#endif
#if defined(POLARSSL_AESNI_C)
#include "polarssl/aesni.h"
#endif
#if !defined(POLARSSL_AES_ALT)
@ -673,6 +676,11 @@ int aes_crypt_ecb( aes_context *ctx,
int i;
uint32_t *RK, X0, X1, X2, X3, Y0, Y1, Y2, Y3;
#if defined(POLARSSL_AESNI_C) && defined(POLARSSL_HAVE_X86_64)
if( aesni_supported() )
return( aesni_crypt_ecb( ctx, mode, input, output ) );
#endif
#if defined(POLARSSL_PADLOCK_C) && defined(POLARSSL_HAVE_X86)
if( aes_padlock_ace )
{