android_kernel_motorola_sm6225/arch/x86/crypto
Jussi Kivilinna 8280daad43 crypto: twofish - add 3-way parallel x86_64 assembler implemention
Patch adds 3-way parallel x86_64 assembly implementation of twofish as new
module. New assembler functions crypt data in three blocks chunks, improving
cipher performance on out-of-order CPUs.

Patch has been tested with tcrypt and automated filesystem tests.

Summary of the tcrypt benchmarks:

Twofish 3-way-asm vs twofish asm (128bit 8kb block ECB)
 encrypt: 1.3x speed
 decrypt: 1.3x speed

Twofish 3-way-asm vs twofish asm (128bit 8kb block CBC)
 encrypt: 1.07x speed
 decrypt: 1.4x speed

Twofish 3-way-asm vs twofish asm (128bit 8kb block CTR)
 encrypt: 1.4x speed

Twofish 3-way-asm vs AES asm (128bit 8kb block ECB)
 encrypt: 1.0x speed
 decrypt: 1.0x speed

Twofish 3-way-asm vs AES asm (128bit 8kb block CBC)
 encrypt: 0.84x speed
 decrypt: 1.09x speed

Twofish 3-way-asm vs AES asm (128bit 8kb block CTR)
 encrypt: 1.15x speed

Full output:
 http://koti.mbnet.fi/axh/kernel/crypto/tcrypt-speed-twofish-3way-asm-x86_64.txt
 http://koti.mbnet.fi/axh/kernel/crypto/tcrypt-speed-twofish-asm-x86_64.txt
 http://koti.mbnet.fi/axh/kernel/crypto/tcrypt-speed-aes-asm-x86_64.txt

Tests were run on:
 vendor_id  : AuthenticAMD
 cpu family : 16
 model      : 10
 model name : AMD Phenom(tm) II X6 1055T Processor

Also userspace test were run on:
 vendor_id  : GenuineIntel
 cpu family : 6
 model      : 15
 model name : Intel(R) Xeon(R) CPU           E7330  @ 2.40GHz
 stepping   : 11

Userspace test results:

Encryption/decryption of twofish 3-way vs x86_64-asm on AMD Phenom II:
 encrypt: 1.27x
 decrypt: 1.25x

Encryption/decryption of twofish 3-way vs x86_64-asm on Intel Xeon E7330:
 encrypt: 1.36x
 decrypt: 1.36x

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2011-10-21 14:23:08 +02:00
..
aes-i586-asm_32.S crypto: aes - Export x86 AES encrypt/decrypt functions 2009-02-18 16:48:05 +08:00
aes-x86_64-asm_64.S crypto: aes - Export x86 AES encrypt/decrypt functions 2009-02-18 16:48:05 +08:00
aes_glue.c crypto: aes-x86 - quiet sparse noise about symbol not declared 2011-09-22 21:33:01 +10:00
aesni-intel_asm.S crypto: aesni-intel - fixed problem with packets that are not multiple of 64bytes 2011-03-27 10:29:39 +08:00
aesni-intel_glue.c crypto: aesni-intel - fix aesni build on i386 2011-05-18 09:03:34 +10:00
blowfish-x86_64-asm_64.S crypto: blowfish-x86_64 - improve x86_64 blowfish 4-way performance 2011-10-21 14:23:07 +02:00
blowfish_glue.c crypto: blowfish-x86_64 - add credits 2011-10-21 14:23:07 +02:00
crc32c-intel.c crypto: crc32c-intel - Switch to shash 2008-12-25 11:01:37 +11:00
fpu.c crypto: aesni-intel - Merge with fpu.ko 2011-05-16 15:12:47 +10:00
ghash-clmulni-intel_asm.S crypto: ghash-clmulni-intel - Put proper .data section in place 2009-11-23 20:19:47 +08:00
ghash-clmulni-intel_glue.c crypto: ghash-intel - Fix set but not used in ghash_async_setkey() 2011-06-30 07:43:42 +08:00
Makefile crypto: twofish - add 3-way parallel x86_64 assembler implemention 2011-10-21 14:23:08 +02:00
salsa20-i586-asm_32.S [CRYPTO] salsa20_i586: Salsa20 stream cipher algorithm (i586 version) 2008-01-11 08:16:57 +11:00
salsa20-x86_64-asm_64.S [CRYPTO] salsa20: Add x86-64 assembly version 2008-01-11 08:16:57 +11:00
salsa20_glue.c [CRYPTO] salsa20: Add x86-64 assembly version 2008-01-11 08:16:57 +11:00
sha1_ssse3_asm.S crypto: sha1 - SSSE3 based SHA1 implementation for x86-64 2011-08-10 19:00:29 +08:00
sha1_ssse3_glue.c crypto: sha1 - SSSE3 based SHA1 implementation for x86-64 2011-08-10 19:00:29 +08:00
twofish-i586-asm_32.S crypto: twofish-x86-asm - make assembler functions use twofish_ctx instead of crypto_tfm 2011-10-21 14:23:08 +02:00
twofish-x86_64-asm_64-3way.S crypto: twofish - add 3-way parallel x86_64 assembler implemention 2011-10-21 14:23:08 +02:00
twofish-x86_64-asm_64.S crypto: twofish-x86-asm - make assembler functions use twofish_ctx instead of crypto_tfm 2011-10-21 14:23:08 +02:00
twofish_glue.c crypto: twofish-x86-asm - make assembler functions use twofish_ctx instead of crypto_tfm 2011-10-21 14:23:08 +02:00
twofish_glue_3way.c crypto: twofish - add 3-way parallel x86_64 assembler implemention 2011-10-21 14:23:08 +02:00