Discussion:
[cryptopp-users] ChaCha using AVX2 available
Jeffrey Walton
2018-11-08 21:36:46 UTC
Permalink
Hi Everyone,

We cut-in our first AVX algorithm today. It is Bernstein's ChaCha and it is
based on Jack Lloyd's implementation for Botan. Jack was kind enough to
allow us to use it.

The numbers are very good. ChaCha8 on a Skylake i5-6400 @ 2.7 GHz:

*SSE2 - 2307 MB/s, 1.12 cpb
*AVX2 - 4411 MB/s, 0.57 cpb

We tested it on Unix and Linux, OS X, Solaris and Windows. We had to make
several tweaks to config.h and cpu.cpp, but it was a clean cut-in. I would
not be surprised if we needed a few more tweaks, but I don't expect any
major issues in the future.

The commit of interest is
https://github.com/weidai11/cryptopp/commit/d9011f07d2d5 . Also see
https://github.com/weidai11/cryptopp/issues/735 .

Jeff
--
You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jeffrey Walton
2018-11-09 03:13:18 UTC
Permalink
Post by Jeffrey Walton
...
We tested it on Unix and Linux, OS X, Solaris and Windows. We had to make
several tweaks to config.h and cpu.cpp, but it was a clean cut-in. I would
not be surprised if we needed a few more tweaks, but I don't expect any
major issues in the future.
The commit of interest is
https://github.com/weidai11/cryptopp/commit/d9011f07d2d5 . Also see
https://github.com/weidai11/cryptopp/issues/735 .
It looks like Windows is a sore spot. Specifically, VS2017 x64 Release
builds. https://ci.appveyor.com/project/noloader/cryptopp/builds/20159656 .

I don't have a Windows machine with AVX2 to test it further.

Can someone with a AVX2 and a Windows machine test ChaCha built with
VS2017, please. You should only need to run 'cryptest.exe tv chacha'.

Jeff
--
You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...