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:
@ -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 )
|
||||
{
|
||||
|
Reference in New Issue
Block a user