Unverified Commit 9acae40f authored by kokke's avatar kokke Committed by GitHub
Browse files

Update aes.c

parent f92f3714
......@@ -618,10 +618,12 @@ void AES_CTR_xcrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, con
state = (state_t*)buffer;
Cipher();
/* Increment counter and handle overflow */
for (j = (BLOCKLEN - 1); j >= 0; --j)
{
counter[j] += 1;
/* Break if no overflow, keep going otherwise */
if (counter[j] != 0)
{
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment