lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2929069.psKOHZKy1K@tauon.chronox.de>
Date:   Thu, 30 May 2019 07:38:17 +0200
From:   Stephan Mueller <smueller@...onox.de>
To:     Richard Weinberger <richard@....at>
Cc:     david <david@...ma-star.at>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: Can an ahash driver be used through shash API?

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ