[NUC472] Remove other unnecessary AES alternative macro definitions

As MBEDTLS_AES_ALT is defined, alternative implementations for all AES functions should be defined.
pull/4925/head
ccli8 2017-08-17 13:17:56 +08:00
parent 925eee0688
commit 6b0213c13d
2 changed files with 0 additions and 12 deletions

View File

@ -22,9 +22,5 @@
#define MBEDTLS_SHA256_ALT
#define MBEDTLS_AES_ALT
#define MBEDTLS_AES_SETKEY_ENC_ALT
#define MBEDTLS_AES_SETKEY_DEC_ALT
#define MBEDTLS_AES_ENCRYPT_ALT
#define MBEDTLS_AES_DECRYPT_ALT
#endif /* MBEDTLS_DEVICE_H */

View File

@ -153,7 +153,6 @@ void mbedtls_aes_free( mbedtls_aes_context *ctx )
/*
* AES key schedule (encryption)
*/
#if defined(MBEDTLS_AES_SETKEY_ENC_ALT)
int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key,
unsigned int keybits )
{
@ -189,12 +188,10 @@ int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key,
return( 0 );
}
#endif /* MBEDTLS_AES_SETKEY_ENC_ALT */
/*
* AES key schedule (decryption)
*/
#if defined(MBEDTLS_AES_SETKEY_DEC_ALT)
int mbedtls_aes_setkey_dec( mbedtls_aes_context *ctx, const unsigned char *key,
unsigned int keybits )
{
@ -209,7 +206,6 @@ exit:
return( ret );
}
#endif /* MBEDTLS_AES_SETKEY_DEC_ALT */
static void __nvt_aes_crypt( mbedtls_aes_context *ctx,
@ -249,7 +245,6 @@ static void __nvt_aes_crypt( mbedtls_aes_context *ctx,
/*
* AES-ECB block encryption
*/
#if defined(MBEDTLS_AES_ENCRYPT_ALT)
void mbedtls_aes_encrypt( mbedtls_aes_context *ctx,
const unsigned char input[16],
unsigned char output[16] )
@ -260,12 +255,10 @@ void mbedtls_aes_encrypt( mbedtls_aes_context *ctx,
__nvt_aes_crypt(ctx, input, output, 16);
}
#endif /* MBEDTLS_AES_ENCRYPT_ALT */
/*
* AES-ECB block decryption
*/
#if defined(MBEDTLS_AES_DECRYPT_ALT)
void mbedtls_aes_decrypt( mbedtls_aes_context *ctx,
const unsigned char input[16],
unsigned char output[16] )
@ -277,7 +270,6 @@ void mbedtls_aes_decrypt( mbedtls_aes_context *ctx,
}
#endif /* MBEDTLS_AES_DECRYPT_ALT */
/*
* AES-ECB block encryption/decryption