]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: des_3des - add x86-64 assembly implementation
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Mon, 9 Jun 2014 17:59:54 +0000 (20:59 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Jun 2014 13:27:58 +0000 (21:27 +0800)
commit3c3da48554cc8d0f015d25fcaece24398f30938b
treeacfe43924f1dd49e686508b4359eccf4d857bbef
parentfafd998e59e2d9e05acefd738db87307f2adac15
crypto: des_3des - add x86-64 assembly implementation

Patch adds x86_64 assembly implementation of Triple DES EDE cipher algorithm.
Two assembly implementations are provided. First is regular 'one-block at
time' encrypt/decrypt function. Second is 'three-blocks at time' function that
gains performance increase on out-of-order CPUs.

tcrypt test results:

Intel Core i5-4570:

des3_ede-asm vs des3_ede-generic:
size    ecb-enc ecb-dec cbc-enc cbc-dec ctr-enc ctr-dec
16B     1.21x   1.22x   1.27x   1.36x   1.25x   1.25x
64B     1.98x   1.96x   1.23x   2.04x   2.01x   2.00x
256B    2.34x   2.37x   1.21x   2.40x   2.38x   2.39x
1024B   2.50x   2.47x   1.22x   2.51x   2.52x   2.51x
8192B   2.51x   2.53x   1.21x   2.56x   2.54x   2.55x

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/Makefile
arch/x86/crypto/des3_ede-asm_64.S [new file with mode: 0644]
arch/x86/crypto/des3_ede_glue.c [new file with mode: 0644]
crypto/Kconfig
crypto/des_generic.c
include/crypto/des.h