]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
crypto: blowfish - add x86_64 assembly implementation
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Thu, 1 Sep 2011 22:45:22 +0000 (01:45 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Sep 2011 11:25:26 +0000 (21:25 +1000)
commit64b94ceae8c16cd1b2800cac83112d3815be5250
treec7e3384659522cac32dc85a34e4ed722346a0f91
parent7d47b86cfef808c6580b7603c3f17fcaf27e9d14
crypto: blowfish - add x86_64 assembly implementation

Patch adds x86_64 assembly implementation of blowfish. Two set of assembler
functions are provided. First set is regular 'one-block at time'
encrypt/decrypt functions. Second is 'four-block at time' functions that
gain performance increase on out-of-order CPUs. Performance of 4-way
functions should be equal to 1-way functions with in-order CPUs.

Summary of the tcrypt benchmarks:

Blowfish assembler vs blowfish C (256bit 8kb block ECB)
encrypt: 2.2x speed
decrypt: 2.3x speed

Blowfish assembler vs blowfish C (256bit 8kb block CBC)
encrypt: 1.12x speed
decrypt: 2.5x speed

Blowfish assembler vs blowfish C (256bit 8kb block CTR)
encrypt: 2.5x speed

Full output:
http://koti.mbnet.fi/axh/kernel/crypto/tcrypt-speed-blowfish-asm-x86_64.txt
http://koti.mbnet.fi/axh/kernel/crypto/tcrypt-speed-blowfish-c-x86_64.txt

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

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/Makefile
arch/x86/crypto/blowfish-x86_64-asm_64.S [new file with mode: 0644]
arch/x86/crypto/blowfish_glue.c [new file with mode: 0644]
crypto/Kconfig