From: Tom Lendacky <thomas.lendacky@amd.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: <linux-crypto@vger.kernel.org>
Subject: Re: Is a crypto_ahash_init required before invoking crypto_ahash_import?
Date: Thu, 25 Feb 2016 16:26:54 -0600 [thread overview]
Message-ID: <56CF7FAE.6060402@amd.com> (raw)
In-Reply-To: <20160225221134.GA27728@gondor.apana.org.au>
On 02/25/2016 04:11 PM, Herbert Xu wrote:
> On Thu, Feb 25, 2016 at 03:56:31PM -0600, Tom Lendacky wrote:
>>
>> I can fix this in the driver by doing a memset to zero of the request
>> context area during the import. But I guess I'm also wondering if there
>> is an expectation/requirement that crypto_ahash_init() be called before
>> doing an import? If there is the I can add that to the testmgr code
>> instead.
>
> No init means wiping out the hash state so that a new hash can be
> computed. Import means importing the hash state so that computation
> can be continued from that point onwards.
>
> So they're independent of each other and you must be able to handle
> an import without an init and vice versa.
Thanks for the clarification Herbert. I'll send in a patch to perform
the memset during the import. I know it's late in the cycle, but will
you be able to apply it to the current cryptodev-2.6 tree which contains
the ccp import/export patches?
Thanks,
Tom
>
> Cheers,
>
next prev parent reply other threads:[~2016-02-25 22:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 21:56 Is a crypto_ahash_init required before invoking crypto_ahash_import? Tom Lendacky
2016-02-25 22:11 ` Herbert Xu
2016-02-25 22:26 ` Tom Lendacky [this message]
2016-02-27 7:35 ` 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=56CF7FAE.6060402@amd.com \
--to=thomas.lendacky@amd.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