From: Dimitrios Siganos <dimitris@siganos.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Subject: Re: hmac(sha1)
Date: Wed, 10 Mar 2010 02:48:02 +0000 [thread overview]
Message-ID: <4B970862.5060904@siganos.org> (raw)
In-Reply-To: <20100309030852.GA8153@gondor.apana.org.au>
Herbert Xu wrote:
> Dimitrios Siganos <dimitris@siganos.org> wrote:
>
>> I am using linux 2.6.28, and in that version, the crc32 implementation
>> is of type AHASH. According to git, crc32 was converted to SHASH on 25
>> Dec 2008. I am basing my AHASH implementation on the crc32 AHASH.
>>
>
> Unless you're implementing a software async driver, I don't think
> crc32c is going to be of that much help.
>
> Cheers,
>
Yes, it looks like crc32 is a synchronous implementation masquerading as
an asynchronous one, so it doesn't help me very much.
Can you please answer the following questions with regards to an
ahash_alg implementation:
1) Do I need to implement .digest?
2) Please confirm that .init should setup a context in the req->ctx to
be used by .update and .final and that .final should destroy that context.
3) Can the .init request carry data?
4) Can the .final request carry data?
5) If any of the functions (.init, .update, .final) completes the work
scheduled synchronously, it should return 0 and not call the complete
function of the request.
6) If any of the functions (.init, .update, .final) returns without
completing the work scheduled, it should return -EINPROGRESS and call
the complete function (if not NULL) of the req when the work is completed.
7) When calling the complete function, what context should it be called
from? For example, can it be interrupt context? Should I take any
precautions/locks before calling the complete function callback?
8) Could you say a few words about the threading model that is in
effect? For example, if I move the context in the req struct, do I need
any kind of locking? Can I assume that the tfm, will not be changing
under my feet, when inside a init/update/final call?
9) Is there a concept of a default key for a hash? For example, could
.init be called calling set_key prior to it? If yes, what should the key
be in that case?
I hope it is not too many questions :-)
Dimitris
next prev parent reply other threads:[~2010-03-10 2:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 3:29 hmac(sha1) Dimitrios Siganos
2010-03-03 20:17 ` hmac(sha1) Dimitrios Siganos
2010-03-03 22:59 ` hmac(sha1) Kim Phillips
2010-03-05 7:32 ` hmac(sha1) Herbert Xu
2010-03-05 16:17 ` hmac(sha1) Dimitrios Siganos
2010-03-09 3:08 ` hmac(sha1) Herbert Xu
2010-03-10 2:48 ` Dimitrios Siganos [this message]
2010-03-10 4:05 ` hmac(sha1) 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=4B970862.5060904@siganos.org \
--to=dimitris@siganos.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.