X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Faes%2Faes_ctr.c;h=aea3db209272189e4e8fcd6638a3e3ed51048e10;hp=8e800481de00fb26b4de1dcc50da38e070796749;hb=dbdc5d14d3301ed9dbab16db7e02f3c9518ac3f3;hpb=6cbe6382944ff47881593935cc5b029f745beeea diff --git a/crypto/aes/aes_ctr.c b/crypto/aes/aes_ctr.c index 8e800481de..aea3db2092 100644 --- a/crypto/aes/aes_ctr.c +++ b/crypto/aes/aes_ctr.c @@ -106,8 +106,8 @@ void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out, while (l--) { if (n == 0) { - AES_ctr128_inc(counter); AES_encrypt(counter, tmp, key); + AES_ctr128_inc(counter); } *(out++) = *(in++) ^ tmp[n]; n = (n+1) % AES_BLOCK_SIZE;