X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fevp%2Fe_aes.c;h=3dc85762a2b78de6e9da8a4a82bedfbaad25c636;hp=d6ba037dcf50f83e07ddff209b4a479e03b97f9d;hb=874a3757aff5ede013a825eea4b82a3e8ba96d34;hpb=1cbdca7bf2d09d7fcae26cf05050e8644a253d9a;ds=sidebyside diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c index d6ba037dcf..3dc85762a2 100644 --- a/crypto/evp/e_aes.c +++ b/crypto/evp/e_aes.c @@ -55,6 +55,7 @@ #include #include #include +#include #include "evp_locl.h" static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, @@ -101,9 +102,19 @@ static int aes_counter (EVP_CIPHER_CTX *ctx, unsigned char *out, { unsigned int num; num = ctx->num; - AES_ctr128_encrypt (in,out,len, +#ifdef AES_CTR_ASM + void AES_ctr32_encrypt(const unsigned char *in, unsigned char *out, + size_t blocks, const AES_KEY *key, + const unsigned char ivec[AES_BLOCK_SIZE]); + + CRYPTO_ctr128_encrypt_ctr32(in,out,len, + &((EVP_AES_KEY *)ctx->cipher_data)->ks, + ctx->iv,ctx->buf,&num,(ctr128_f)AES_ctr32_encrypt); +#else + CRYPTO_ctr128_encrypt(in,out,len, &((EVP_AES_KEY *)ctx->cipher_data)->ks, - ctx->iv,ctx->buf,&num); + ctx->iv,ctx->buf,&num,(block128_f)AES_encrypt); +#endif ctx->num = (size_t)num; return 1; }