linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
To: ext Herbert Xu <herbert@gondor.hengli.com.au>
Cc: Uri Simchoni <uri@jdland.co.il>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH 0/2] crypto: omap-sha1-md5: OMAP3 SHA1 & MD5 driver
Date: Tue, 13 Apr 2010 17:36:40 +0300	[thread overview]
Message-ID: <4BC48178.4020104@nokia.com> (raw)
In-Reply-To: <4BC47543.1020508@nokia.com>

Also one more question.

can reqa and reqb could come from the same tfm as well?

thanks

On 13/04/10 16:44, Kasatkin Dmitry (Nokia-D/Helsinki) wrote:
> Please see inline. Nice to clarify it.
>
> On 13/04/10 15:10, ext Herbert Xu wrote:
>    
>> On Tue, Apr 13, 2010 at 01:15:34PM +0300, Dmitry Kasatkin wrote:
>>
>>      
>>> But anyway hmac does not support ahash now. right?
>>> So the only way currently is to add to the driver.
>>>
>>>        
>> No the only way is to add an ahash version of hmac.
>>
>> Anyway, the fact that you can't easily implement import/export
>> is not just a question of supporting hmac.  It is in fact a sign
>> that your driver breaks the crypto API.
>>
>> The fundamental requirement for the ahash interface is that you
>> must be able to launch multiple operations, which means that all
>> state must be stored in the request and not held in hardware
>> (except as a cache).
>>
>> IOW, you must be able to support
>>
>> 	crypto_ahash_update(&reqa);
>>
>> 	...
>>
>> 	crypto_ahash_update(&reqb);
>>
>> 	...
>>
>> 	ahash_request_set_crypt(&reqa, ...);
>> 	crypto_ahash_finup(&reqa);
>>
>> 	...
>>
>> 	ahash_request_set_crypt(&reqb, ...);
>> 	crypto_ahash_finup(&reqb);
>>
>> AFAICS your driver cannot do this correctly in its current form.
>>
>>
>>      
> Well it can... if reqa occupied hw all other requests will fallback to
> sw sha1.
>
> But if to do only hw and to follow above algorithm then it is necessary
> to remove shash support completely from the driver.
> And have a queue as I have with aes driver..
> err = ablkcipher_enqueue_request(&dd->queue, req);
>
> I see there is ahash_enqueue_request() which is in
> crypto/internal/hash.h and NEVER called.
>
> Also in one of your earlier emails you said that it is not possible to
> call crypto_ahash_update() before completion.
> But with having a queue it does not really matter.
> Possible to queue several update request from the same tfm.
>
> The only need to wait_for_completion is to export/get results...
>
> Can you confirm my understanding?
>
> Thanks
>
>
>
> Well. not like that.
>
>    
>> Thanks,
>>
>>      
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>    

  reply	other threads:[~2010-04-13 14:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 16:35 [PATCH 0/2] crypto: omap-sha1-md5: OMAP3 SHA1 & MD5 driver Dmitry.Kasatkin
2010-04-13  8:59 ` Herbert Xu
2010-04-13  9:39   ` Dmitry Kasatkin
2010-04-13 10:03     ` Herbert Xu
2010-04-13 10:13       ` Dmitry Kasatkin
2010-04-13 12:02         ` Herbert Xu
2010-04-13 13:00           ` Dmitry Kasatkin
2010-04-13 14:45             ` Herbert Xu
2010-04-13 15:16               ` Uri Simchoni
2010-04-13 15:21                 ` Dmitry Kasatkin
2010-04-14  0:44                   ` Herbert Xu
2010-04-14  6:37                     ` Dmitry Kasatkin
2010-04-14  6:44                       ` Herbert Xu
2010-04-14  6:51                         ` Dmitry Kasatkin
2010-04-14  6:55                           ` Herbert Xu
2010-04-16  7:44                             ` Dmitry Kasatkin
2010-04-19 13:27                               ` Herbert Xu
2010-04-13 10:15       ` Dmitry Kasatkin
2010-04-13 12:00         ` Uri Simchoni
2010-04-13 12:10         ` Herbert Xu
2010-04-13 13:44           ` Dmitry Kasatkin
2010-04-13 14:36             ` Dmitry Kasatkin [this message]
2010-04-13 14:42               ` Herbert Xu
2010-04-13 15:33                 ` Dmitry Kasatkin
2010-04-14  0:47                   ` Herbert Xu
2010-04-13 14:48             ` Herbert Xu
2010-04-13 15:48               ` Dmitry Kasatkin
2010-04-14  0:50                 ` Herbert Xu
  -- strict thread matches above, loose matches on Subject: below --
2010-03-17 13:12 Dmitry Kasatkin
2010-03-23 11:32 ` Herbert Xu
2010-03-24  7:31   ` Dmitry Kasatkin
2010-03-24 14:51   ` Dmitry Kasatkin
2010-04-08 14:07     ` Herbert Xu
2010-04-08 14:04   ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BC48178.4020104@nokia.com \
    --to=dmitry.kasatkin@nokia.com \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=uri@jdland.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).