lkml.org 
[lkml]   [2019]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] crypto: gcm - helper functions for assoclen/authsize check
Date
On 7/25/2019 4:47 PM, Iuliana Prodan wrote:
> Added inline helper functions to check authsize and assoclen for
> gcm and rfc4106.
Also rfc4543.

> diff --git a/include/crypto/gcm.h b/include/crypto/gcm.h
> index c50e057..9834b97 100644
> --- a/include/crypto/gcm.h
> +++ b/include/crypto/gcm.h
> @@ -5,4 +5,57 @@
> #define GCM_RFC4106_IV_SIZE 8
> #define GCM_RFC4543_IV_SIZE 8
>
> +/*
> + * validate authentication tag for GCM
> + */
> +static inline int check_gcm_authsize(unsigned int authsize)
I'd prefix the helper names with crypto_

Horia

\
 
 \ /
  Last update: 2019-07-26 16:12    [W:0.068 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site