lkml.org 
[lkml]   [2015]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH RFC 1/2] crypto: add PKE API
Date
Tadeusz Struk <tadeusz.struk@intel.com> wrote:

> +config CRYPTO_PKE

I would prefer CRYPTO_PKEY and pkey rather than pke generally and algo rather
than alg where possible - this will have more consistency with what we have
now.

I understand, however, that in core crypto code, 'alg' is used.

+ seq_printf(m, "can encrypt : %s\n", cap & PKEY_CAN_ENCRYPT ?
+ "yes" : "no");

Please split the line after the comma.

> #define CRYPTO_ALG_TYPE_AHASH 0x0000000a
> +#define CRYPTO_ALG_TYPE_PKE 0x0000000b
> #define CRYPTO_ALG_TYPE_RNG 0x0000000c

Will filling a hole cause a problem with something that got obsoleted?

> +struct pke_request {
> + struct crypto_async_request base;
> + const struct public_key *pk;
> + const struct public_key_signature *pks;
> +};

I recommend:

pk -> key or pkey
pks -> sig or signature

> + u8 pub_mpis; /* Number of MPIs in public key */
> + u8 sec_mpis; /* Number of MPIs in secret key */
> + u8 sig_mpis; /* Number of MPIs in a signature */

Keep member names as:

u8 n_pub_mpi; /* Number of MPIs in public key */
u8 n_sec_mpi; /* Number of MPIs in secret key */
u8 n_sig_mpi; /* Number of MPIs in a signature */

please.

David


\
 
 \ /
  Last update: 2015-05-01 18:41    [W:0.241 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site