[v3,0/2] crypto: validate inputs for gcm and aes
mbox series

Message ID 1564578355-9639-1-git-send-email-iuliana.prodan@nxp.com
Headers show
Series
  • crypto: validate inputs for gcm and aes
Related show

Message

Iuliana Prodan July 31, 2019, 1:05 p.m. UTC
Added inline helper functions to check authsize and assoclen for
gcm, rfc4106 and rfc4543.  
Added, also, inline helper function to check key length for AES algorithms.
These are used in the generic implementation of gcm/rfc4106/rfc4543
and aes.

Changes since v2:
- rename aes helper functions without crypto_ prefix;
- change include for gcm.h.

Iuliana Prodan (2):
  crypto: gcm - helper functions for assoclen/authsize check
  crypto: aes - helper function to validate key length for AES
    algorithms

 crypto/gcm.c         | 41 ++++++++++++++-------------------------
 include/crypto/aes.h | 17 ++++++++++++++++
 include/crypto/gcm.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/crypto/aes.c     |  8 ++++----
 4 files changed, 91 insertions(+), 30 deletions(-)

Comments

Horia Geanta July 31, 2019, 1:35 p.m. UTC | #1
On 7/31/2019 4:06 PM, Iuliana Prodan wrote:
> Added inline helper functions to check authsize and assoclen for
> gcm, rfc4106 and rfc4543.  
> Added, also, inline helper function to check key length for AES algorithms.
> These are used in the generic implementation of gcm/rfc4106/rfc4543
> and aes.
> 
For the series:
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>

Thanks,
Horia
Ard Biesheuvel Aug. 1, 2019, 7:14 a.m. UTC | #2
On Wed, 31 Jul 2019 at 16:35, Horia Geanta <horia.geanta@nxp.com> wrote:
>
> On 7/31/2019 4:06 PM, Iuliana Prodan wrote:
> > Added inline helper functions to check authsize and assoclen for
> > gcm, rfc4106 and rfc4543.
> > Added, also, inline helper function to check key length for AES algorithms.
> > These are used in the generic implementation of gcm/rfc4106/rfc4543
> > and aes.
> >
> For the series:
> Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
>

Likewise,

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Herbert Xu Aug. 9, 2019, 6:18 a.m. UTC | #3
On Wed, Jul 31, 2019 at 04:05:53PM +0300, Iuliana Prodan wrote:
> Added inline helper functions to check authsize and assoclen for
> gcm, rfc4106 and rfc4543.  
> Added, also, inline helper function to check key length for AES algorithms.
> These are used in the generic implementation of gcm/rfc4106/rfc4543
> and aes.
> 
> Changes since v2:
> - rename aes helper functions without crypto_ prefix;
> - change include for gcm.h.
> 
> Iuliana Prodan (2):
>   crypto: gcm - helper functions for assoclen/authsize check
>   crypto: aes - helper function to validate key length for AES
>     algorithms
> 
>  crypto/gcm.c         | 41 ++++++++++++++-------------------------
>  include/crypto/aes.h | 17 ++++++++++++++++
>  include/crypto/gcm.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  lib/crypto/aes.c     |  8 ++++----
>  4 files changed, 91 insertions(+), 30 deletions(-)

All applied.  Thanks.