diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2014-06-09 13:59:54 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-06-20 09:27:58 -0400 |
commit | 6574e6c64e971c9adb629e81e497afdb52b1c9df (patch) | |
tree | acfe43924f1dd49e686508b4359eccf4d857bbef /crypto/Kconfig | |
parent | 87131507e1a60c4803d54816b86091490b67ad68 (diff) |
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>
Diffstat (limited to 'crypto/Kconfig')
-rw-r--r-- | crypto/Kconfig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig index c9c1cd91031c..025c5108442e 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig | |||
@@ -1019,6 +1019,19 @@ config CRYPTO_DES_SPARC64 | |||
1019 | DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3), | 1019 | DES cipher algorithm (FIPS 46-2), and Triple DES EDE (FIPS 46-3), |
1020 | optimized using SPARC64 crypto opcodes. | 1020 | optimized using SPARC64 crypto opcodes. |
1021 | 1021 | ||
1022 | config CRYPTO_DES3_EDE_X86_64 | ||
1023 | tristate "Triple DES EDE cipher algorithm (x86-64)" | ||
1024 | depends on X86 && 64BIT | ||
1025 | select CRYPTO_ALGAPI | ||
1026 | select CRYPTO_DES | ||
1027 | help | ||
1028 | Triple DES EDE (FIPS 46-3) algorithm. | ||
1029 | |||
1030 | This module provides implementation of the Triple DES EDE cipher | ||
1031 | algorithm that is optimized for x86-64 processors. Two versions of | ||
1032 | algorithm are provided; regular processing one input block and | ||
1033 | one that processes three blocks parallel. | ||
1034 | |||
1022 | config CRYPTO_FCRYPT | 1035 | config CRYPTO_FCRYPT |
1023 | tristate "FCrypt cipher algorithm" | 1036 | tristate "FCrypt cipher algorithm" |
1024 | select CRYPTO_ALGAPI | 1037 | select CRYPTO_ALGAPI |