lkml.org 
[lkml]   [2021]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] crypto: keembay-ocs-aes - Fix 'q' assignment during CCM B0 generation
On Wed, Feb 03, 2021 at 03:42:10PM +0000, Daniele Alessandrelli wrote:
> From: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
>
> In ocs_aes_ccm_write_b0(), 'q' (the octet length of the binary
> representation of the octet length of the payload) is set to 'iv[0]',
> while it should be set to 'iv[0] & 0x7' (i.e., only the last 3
> bits of iv[0] should be used), as documented in NIST Special Publication
> 800-38C:
> https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38c.pdf
>
> In practice, this is not an issue, since 'iv[0]' is checked to be in the
> range [1-7] by ocs_aes_validate_inputs(), but let's fix the assignment
> anyway, in order to make the code more robust.
>
> Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@intel.com>
> ---
> drivers/crypto/keembay/ocs-aes.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

\
 
 \ /
  Last update: 2021-02-10 08:25    [W:0.051 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site