lkml.org 
[lkml]   [2019]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v9 05/10] X.509: parse public key parameters from x509 for akcipher
From
Date
Hi Vitaly,

On 04/11/2019 10:51 AM, Vitaly Chikunov wrote:
> Some public key algorithms (like EC-DSA) keep in parameters field
> important data such as digest and curve OIDs (possibly more for
> different EC-DSA variants). Thus, just setting a public key (as
> for RSA) is not enough.
>
> Append parameters into the key stream for akcipher_set_{pub,priv}_key.
> Appended data is: (u32) algo OID, (u32) parameters length, parameters
> data.
>
> This does not affect current akcipher API nor RSA ciphers (they could
> ignore it). Idea of appending parameters to the key stream is by Herbert
> Xu.
>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Denis Kenzior <denkenz@gmail.com>
> Cc: keyrings@vger.kernel.org
> Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
> ---
> crypto/asymmetric_keys/asym_tpm.c | 9 +++-
> crypto/asymmetric_keys/public_key.c | 72 ++++++++++++++++++++++++-------
> crypto/asymmetric_keys/x509.asn1 | 2 +-
> crypto/asymmetric_keys/x509_cert_parser.c | 31 +++++++++++++
> crypto/testmgr.c | 24 +++++++++--
> crypto/testmgr.h | 5 +++
> include/crypto/akcipher.h | 18 ++++----
> include/crypto/public_key.h | 4 ++
> 8 files changed, 136 insertions(+), 29 deletions(-)
>

Looks good to me.

Reviewed-by: Denis Kenzior <denkenz@gmail.com>

By the way:

> @@ -400,11 +401,12 @@ static inline int crypto_akcipher_set_pub_key(struct crypto_akcipher *tfm,
> * crypto_akcipher_set_priv_key() - Invoke set private key operation
> *
> * Function invokes the algorithm specific set key function, which knows
> - * how to decode and interpret the encoded key
> + * how to decode and interpret the encoded keya and parameters

Seems to be a stray 'a' after 'key'?

Regards,
-Denis

\
 
 \ /
  Last update: 2019-04-11 19:19    [W:0.076 / U:2.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site