Re: [RFC PATCH v3] akcipher: Introduce verify_rsa/verify for public key algorithms

2019-01-25 Thread Herbert Xu
On Fri, Jan 25, 2019 at 02:18:09PM +0300, Vitaly Chikunov wrote: > > Well, if we allowed to reuse dst* fields why not just put digest over > dst scatterlist? That would be much simpler. Please see below. > > The advantage of having it in one scatterlist is that for those > > users that already

Re: [RFC PATCH v3] akcipher: Introduce verify_rsa/verify for public key algorithms

2019-01-25 Thread Vitaly Chikunov
On Fri, Jan 25, 2019 at 06:09:29PM +0800, Herbert Xu wrote: > On Fri, Jan 18, 2019 at 11:58:46PM +0300, Vitaly Chikunov wrote: > > Previous akcipher .verify() just `decrypts' (using RSA encrypt which is > > using public key) signature to uncover message hash, which was then > > compared in upper le

Re: [RFC PATCH v3] akcipher: Introduce verify_rsa/verify for public key algorithms

2019-01-25 Thread Herbert Xu
On Fri, Jan 18, 2019 at 11:58:46PM +0300, Vitaly Chikunov wrote: > 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, wh

[RFC PATCH v3] akcipher: Introduce verify_rsa/verify for public key algorithms

2019-01-18 Thread Vitaly Chikunov
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 never passed into verify(). This approach was incompatibl