Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-07-08 Thread Tadeusz Struk
On 07/08/2016 09:38 AM, Mat Martineau wrote: > Are the inputs and outputs defined for ALG_OP_VERIFY in SET_KEY mode > going to work for hardware keys (like TPM) in SET_KEY_ID mode? That's > needed if the verify SET_KEY_ID mode is to be added later. Yes, we will just need to change the

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-07-08 Thread Tadeusz Struk
On 07/08/2016 09:38 AM, Mat Martineau wrote: > Are the inputs and outputs defined for ALG_OP_VERIFY in SET_KEY mode > going to work for hardware keys (like TPM) in SET_KEY_ID mode? That's > needed if the verify SET_KEY_ID mode is to be added later. Yes, we will just need to change the

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-07-08 Thread Mat Martineau
On Fri, 8 Jul 2016, Tadeusz Struk wrote: Hi Mat, On 07/06/2016 12:38 PM, Mat Martineau wrote: So it looks like the only thing that we need to return to the user in this case is the return code. Do you agree? The way verify_signature is implemented today, the only output is the return code.

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-07-08 Thread Mat Martineau
On Fri, 8 Jul 2016, Tadeusz Struk wrote: Hi Mat, On 07/06/2016 12:38 PM, Mat Martineau wrote: So it looks like the only thing that we need to return to the user in this case is the return code. Do you agree? The way verify_signature is implemented today, the only output is the return code.

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-07-08 Thread Tadeusz Struk
Hi Mat, On 07/06/2016 12:38 PM, Mat Martineau wrote: >> So it looks like the only thing that we need to return to the user in >> this case is the return code. Do you agree? > > The way verify_signature is implemented today, the only output is the > return code. For verify, maybe no read is

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-07-08 Thread Tadeusz Struk
Hi Mat, On 07/06/2016 12:38 PM, Mat Martineau wrote: >> So it looks like the only thing that we need to return to the user in >> this case is the return code. Do you agree? > > The way verify_signature is implemented today, the only output is the > return code. For verify, maybe no read is

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-07-06 Thread Mat Martineau
On Tue, 5 Jul 2016, Tadeusz Struk wrote: Hi Mat, On 06/29/2016 11:43 AM, Mat Martineau wrote: +ret = verify_signature(key, ); +if (!ret) { +req->dst_len = sizeof(digest); I think you fixed the BUG_ON() problem but there's still an issue with the handling of the digest. Check

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-07-06 Thread Mat Martineau
On Tue, 5 Jul 2016, Tadeusz Struk wrote: Hi Mat, On 06/29/2016 11:43 AM, Mat Martineau wrote: +ret = verify_signature(key, ); +if (!ret) { +req->dst_len = sizeof(digest); I think you fixed the BUG_ON() problem but there's still an issue with the handling of the digest. Check

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-07-05 Thread Tadeusz Struk
Hi Mat, On 06/29/2016 11:43 AM, Mat Martineau wrote: >> +ret = verify_signature(key, ); >> +if (!ret) { >> +req->dst_len = sizeof(digest); > > I think you fixed the BUG_ON() problem but there's still an issue with > the handling of the digest. Check the use of sig->digest in >

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-07-05 Thread Tadeusz Struk
Hi Mat, On 06/29/2016 11:43 AM, Mat Martineau wrote: >> +ret = verify_signature(key, ); >> +if (!ret) { >> +req->dst_len = sizeof(digest); > > I think you fixed the BUG_ON() problem but there's still an issue with > the handling of the digest. Check the use of sig->digest in >

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-06-29 Thread Mat Martineau
Tadeusz, On Thu, 23 Jun 2016, Tadeusz Struk wrote: This patch adds support for asymmetric key type to AF_ALG. It will work as follows: A new PF_ALG socket options are added on top of existing ALG_SET_KEY and ALG_SET_PUBKEY, namely ALG_SET_KEY_ID and ALG_SET_PUBKEY_ID for setting public and

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-06-29 Thread Mat Martineau
Tadeusz, On Thu, 23 Jun 2016, Tadeusz Struk wrote: This patch adds support for asymmetric key type to AF_ALG. It will work as follows: A new PF_ALG socket options are added on top of existing ALG_SET_KEY and ALG_SET_PUBKEY, namely ALG_SET_KEY_ID and ALG_SET_PUBKEY_ID for setting public and

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-06-23 Thread kbuild test robot
Hi, [auto build test ERROR on cryptodev/master] [also build test ERROR on v4.7-rc4 next-20160623] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-06-23 Thread kbuild test robot
Hi, [auto build test ERROR on cryptodev/master] [also build test ERROR on v4.7-rc4 next-20160623] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-06-23 Thread Tadeusz Struk
This patch adds support for asymmetric key type to AF_ALG. It will work as follows: A new PF_ALG socket options are added on top of existing ALG_SET_KEY and ALG_SET_PUBKEY, namely ALG_SET_KEY_ID and ALG_SET_PUBKEY_ID for setting public and private keys respectively. When these new options will be

[PATCH v8 6/6] crypto: AF_ALG - add support for key_id

2016-06-23 Thread Tadeusz Struk
This patch adds support for asymmetric key type to AF_ALG. It will work as follows: A new PF_ALG socket options are added on top of existing ALG_SET_KEY and ALG_SET_PUBKEY, namely ALG_SET_KEY_ID and ALG_SET_PUBKEY_ID for setting public and private keys respectively. When these new options will be