Re: [PATCH] crypto: keembay: ocs-aes: use 64-bit arithmetic for computing bit_len

2021-01-21 Thread Herbert Xu
On Fri, Jan 15, 2021 at 10:46:05PM +0200, Ovidiu Panait wrote: > 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

Re: [PATCH] crypto: keembay: ocs-aes: use 64-bit arithmetic for computing bit_len

2021-01-18 Thread Alessandrelli, Daniele
Hi Ovidiu, Thanks for spotting and fixing this. On Fri, 2021-01-15 at 22:46 +0200, Ovidiu Panait wrote: > 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;

[PATCH] crypto: keembay: ocs-aes: use 64-bit arithmetic for computing bit_len

2021-01-15 Thread Ovidiu Panait
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