From: Steffen Klassert <steffen.klassert@secunet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH v2] crypto: authenc - convert to ahash
Date: Thu, 23 Jul 2009 12:23:14 +0200 [thread overview]
Message-ID: <20090723102314.GN20288@secunet.com> (raw)
In-Reply-To: <20090721130725.GA19550@gondor.apana.org.au>
On Tue, Jul 21, 2009 at 09:07:25PM +0800, Herbert Xu wrote:
> On Tue, Jul 21, 2009 at 02:25:09PM +0200, Steffen Klassert wrote:
> > I just noticed that your shash version of hmac keeps the paded keys
> > on the transform. I assumed the hashing to be reentrant, so I
> > removed the locks arround the hash functions here.
>
> The padded keys are in the transform because they never change
> unless you call setkey. The assumption has always been that
> you should use one tfm per key.
>
I found the problem. It's the digest state that is saved on the
transform right behind the opad in hmac_finup() and hmac_final().
The digest state is of course not constant and must be saved on the
request. That's why I needed the locks in authenc to get pcrypt to
work. I have a patch which moves the digest state to the request,
based on the cryptodev-2.6 tree.
However, as soon as your recent import/export patches are in the
cryptodev-2.6 tree we could probaply change hmac to do prehashing of the
keys what would fix the problem too.
next prev parent reply other threads:[~2009-07-23 10:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 9:02 [PATCH v2] crypto: authenc - convert to ahash Steffen Klassert
2009-07-21 12:25 ` Steffen Klassert
2009-07-21 13:07 ` Herbert Xu
2009-07-21 13:23 ` Steffen Klassert
2009-07-23 10:23 ` Steffen Klassert [this message]
2009-07-24 7:23 ` Herbert Xu
2009-07-24 8:32 ` Steffen Klassert
2009-07-22 7:02 ` Herbert Xu
2009-07-22 7:32 ` Steffen Klassert
2009-07-22 7:52 ` 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=20090723102314.GN20288@secunet.com \
--to=steffen.klassert@secunet.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox