From: Stephan Mueller <smueller@chronox.de>
To: Richard Weinberger <richard@nod.at>
Cc: david <david@sigma-star.at>,
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Can an ahash driver be used through shash API?
Date: Thu, 30 May 2019 07:38:17 +0200 [thread overview]
Message-ID: <2929069.psKOHZKy1K@tauon.chronox.de> (raw)
In-Reply-To: <1331220190.73461.1559161310462.JavaMail.zimbra@nod.at>
Am Mittwoch, 29. Mai 2019, 22:21:50 CEST schrieb Richard Weinberger:
Hi Richard,
> Stephan,
>
> ----- Ursprüngliche Mail -----
>
> >> I've seen that it does actually work the other way around, since
> >> crypto_init_shash_ops_async() in crypto/shash.c takes care of translating
> >> calls from ahash to shash and that's how the *-generic drivers are usable
> >> through the ahash API.
> >
> > The crypto_alloc_shash will only identify cipher implementations that were
> > registered with the CRYPTO_ALG_TYPE_SHASH flag. That flag is set when a
> > cipher is registered using crypto_register_shash.
> >
> > Thus, ciphers registered with crypto_register_ahash will not bear this
> > flag
> > and thus will not be found by the allocation function.
>
> is there a reason why we don't emulate the synchronous functionality
> in the crypto API layer if a driver implements only the async interface?
>
> Or is it just a matter of -ENOPATCH? :)
How can that be done in the first place? SHASH is intended and is used with
stack variables. An AHASH will have to be expected to sleep inbetween. Thus,
it cannot be used as SHASH.
Ciao
Stephan
next prev parent reply other threads:[~2019-05-30 5:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 14:04 David Gstir
2019-05-29 14:18 ` Stephan Mueller
2019-05-29 20:21 ` Richard Weinberger
2019-05-30 5:38 ` Stephan Mueller [this message]
2019-05-30 10:02 ` Pascal Van Leeuwen
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=2929069.psKOHZKy1K@tauon.chronox.de \
--to=smueller@chronox.de \
--cc=david@sigma-star.at \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richard@nod.at \
/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
all inboxes | Powered by JetHome®