Re: [PATCH] crypto: keembay-ocs-aes - Fix 'q' assignment during CCM B0 generation

2021-02-09 Thread Herbert Xu
On Wed, Feb 03, 2021 at 03:42:10PM +, Daniele Alessandrelli wrote: > From: Daniele Alessandrelli > > 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

[PATCH] crypto: keembay-ocs-aes - Fix 'q' assignment during CCM B0 generation

2021-02-03 Thread Daniele Alessandrelli
From: Daniele Alessandrelli 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