diff --git a/kernel/chacha8.c b/kernel/chacha8.c index 088e6f8..94eaad6 100644 --- a/kernel/chacha8.c +++ b/kernel/chacha8.c @@ -88,7 +88,7 @@ void chacha8_hash(const u64 nonce, const u8 key[CHACHA20_KEY_SIZE], u8 *out) chacha20_init(&ctx, key, nonce); - for (i = 0; i < ARRAY_SIZE(x); ++i) + for (i = 0; i < CHACHA20_BLOCK_WORDS; ++i) x[i] = ctx.state[i]; EIGHT_ROUNDS(x);