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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 30 May 2019 10:02:57 +0000
From:   Pascal Van Leeuwen <pvanleeuwen@...idesecure.com>
To:     Richard Weinberger <richard@....at>,
        Stephan Mueller <smueller@...onox.de>
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?

> >
> > 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? :)
> 
Well, one reason might be that asynchronous implementations are usually
hardware accelerators that rely on many operations being batch queued in
order to actually usefully accelerate anything (due to large latencies).
Which you can't do from the synchronous interface, so you'd get a slow down, 
not a speed up. 
(But some people - Ad :-) - might argue that using the accelerator may still
be useful to offload the CPU, reduce power consumption, etc.)

In any case, I didn't really know this but I'm quite happy with it. If you
want *performance*, you shouldn't end up at a h/w accelerator with a 
synchronous API. If you do want the h/w acceleration, you can always use
the asynchronous API, so nothing lost there, you do have a choice.

Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Inside Secure
www.insidesecure.com

Powered by blists - more mailing lists