summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2018-11-11 10:36:25 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2018-11-16 14:11:04 +0800
commite4e72063d3c0ee9ba10faeb5645dcdaae2d733e9 (patch)
treea012d1564a5c5491b3488e699e71b6159d21bf0c /firmware
parent05ba88468b7d85c50d0945446248e0fcda7536bb (diff)
crypto: x86/chacha20 - Support partial lengths in 1-block SSSE3 variant
Add a length argument to the single block function for SSSE3, so the block function may XOR only a partial length of the full block. Given that the setup code is rather cheap, the function does not process more than one block; this allows us to keep the block function selection in the C glue code. The required branching does not negatively affect performance for full block sizes. The partial XORing uses simple "rep movsb" to copy the data before and after doing XOR in SSE. This is rather efficient on modern processors; movsw can be slightly faster, but the additional complexity is probably not worth it. Signed-off-by: Martin Willi <martin@strongswan.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions