Oops, I forgot to replace 'counter' with 'ivec' when used...
This commit is contained in:
parent
900f062d1f
commit
5f24adda77
1 changed files with 2 additions and 2 deletions
|
@ -153,8 +153,8 @@ void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
|||
|
||||
while (l--) {
|
||||
if (n == 0) {
|
||||
AES_encrypt(counter, ecount_buf, key);
|
||||
AES_ctr128_inc(counter);
|
||||
AES_encrypt(ivec, ecount_buf, key);
|
||||
AES_ctr128_inc(ivec);
|
||||
}
|
||||
*(out++) = *(in++) ^ ecount_buf[n];
|
||||
n = (n+1) % AES_BLOCK_SIZE;
|
||||
|
|
Loading…
Reference in a new issue