chapoly: Add an SSSE3 based driver
authorMartin Willi <martin@revosec.ch>
Thu, 2 Apr 2015 13:11:02 +0000 (15:11 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 29 Jun 2015 15:32:14 +0000 (17:32 +0200)
commit755dadcfda58405eae7f48847751c79631a62b55
tree7b4da5213509c55557f4a5cb7cfd0d1687da924a
parent42459b41f04b095a3d412c0b2ca82360f3983a38
chapoly: Add an SSSE3 based driver

We always build the driver on x86/x64, but enable it only if SSSE3 support
is detected during runtime.

Poly1305 uses parallel 32-bit multiplication operands yielding a 64-bit result,
for which two can be done in parallel in SSE. This is minimally faster than
multiplication with 64-bit operands, and also works on 32-bit builds not having
a __int128 result type.

On a 32-bit architecture, this is more than twice as fast as the portable
driver, and on 64-bit it is ~30% faster.
src/libstrongswan/plugins/chapoly/Makefile.am
src/libstrongswan/plugins/chapoly/chapoly_drv.c
src/libstrongswan/plugins/chapoly/chapoly_drv_ssse3.c [new file with mode: 0644]
src/libstrongswan/plugins/chapoly/chapoly_drv_ssse3.h [new file with mode: 0644]