Re: [RFC PATCH v4] akcipher: new verify API for public key algorithms

2019-02-04 Thread Vitaly Chikunov
Herbert, On Fri, Feb 01, 2019 at 10:09:23AM +0300, Vitaly Chikunov wrote: > On Fri, Feb 01, 2019 at 02:26:55PM +0800, Herbert Xu wrote: > > On Fri, Jan 25, 2019 at 09:01:16PM +0300, Vitaly Chikunov wrote: > > > > > > @@ -781,36 +780,17 @@ static int tpm_key_verify_signature(const struct > > > key

Re: [RFC PATCH v4] akcipher: new verify API for public key algorithms

2019-01-31 Thread Vitaly Chikunov
Herbert, On Fri, Feb 01, 2019 at 02:26:55PM +0800, Herbert Xu wrote: > On Fri, Jan 25, 2019 at 09:01:16PM +0300, Vitaly Chikunov wrote: > > > > @@ -781,36 +780,17 @@ static int tpm_key_verify_signature(const struct key > > *key, > > if (!req) > > goto error_free_tfm; > > > > -

Re: [RFC PATCH v4] akcipher: new verify API for public key algorithms

2019-01-31 Thread Herbert Xu
On Fri, Jan 25, 2019 at 09:01:16PM +0300, Vitaly Chikunov wrote: > > @@ -781,36 +780,17 @@ static int tpm_key_verify_signature(const struct key > *key, > if (!req) > goto error_free_tfm; > > - ret = -ENOMEM; > - outlen = crypto_akcipher_maxsize(tfm); > - output =

[RFC PATCH v4] akcipher: new verify API for public key algorithms

2019-01-25 Thread Vitaly Chikunov
API is reworked following suggestions of Herbert Xu. Previous akcipher .verify() just `decrypts' (using RSA encrypt which is using public key) signature to uncover message hash, which was then compared in upper level public_key_verify_signature() with the expected hash value, which itself was neve