Commit 98066f2f authored by Eric Biggers's avatar Eric Biggers Committed by Herbert Xu
Browse files

crypto: lib/chacha - strongly type the ChaCha state



The ChaCha state matrix is 16 32-bit words.  Currently it is represented
in the code as a raw u32 array, or even just a pointer to u32.  This
weak typing is error-prone.  Instead, introduce struct chacha_state:

    struct chacha_state {
            u32 x[16];
    };

Convert all ChaCha and HChaCha functions to use struct chacha_state.
No functional changes.

Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Acked-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 97855e7f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment