linux/drivers/crypto/keembay
Ovidiu Panait 29dfe4d94f crypto: keembay - use 64-bit arithmetic for computing bit_len
src_size and aad_size are defined as u32, so the following expressions are
currently being evaluated using 32-bit arithmetic:

bit_len = src_size * 8;
...
bit_len = aad_size * 8;

However, bit_len is used afterwards in a context that expects a valid
64-bit value (the lower and upper 32-bit words of bit_len are extracted
and written to hw).

In order to make sure the correct bit length is generated and the 32-bit
multiplication does not wrap around, cast src_size and aad_size to u64.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Acked-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2021-01-22 14:58:04 +11:00
..
Kconfig crypto: keembay-ocs-hcu - Add dependency on HAS_IOMEM and ARCH_KEEMBAY 2021-01-14 17:43:10 +11:00
keembay-ocs-aes-core.c
keembay-ocs-hcu-core.c crypto: keembay-ocs-hcu - Fix a WARN() message 2021-01-14 17:10:30 +11:00
Makefile crypto: keembay - Add Keem Bay OCS HCU driver 2021-01-03 08:41:36 +11:00
ocs-aes.c crypto: keembay - use 64-bit arithmetic for computing bit_len 2021-01-22 14:58:04 +11:00
ocs-aes.h
ocs-hcu.c crypto: keembay-ocs-hcu - Add HMAC support 2021-01-03 08:41:36 +11:00
ocs-hcu.h crypto: keembay-ocs-hcu - Add HMAC support 2021-01-03 08:41:36 +11:00