[PATCH 2/2] crypto: des_3des - add x86-64 assembly implementation

2014-06-09 Thread Jussi Kivilinna
024B 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 --- arch/x86/crypto/Makefile |2 arch/x86/crypto/des3_ede-asm_64.S | 805 + arch/x86/crypto/des3

[PATCH 1/2] crypto: tcrypt - add ctr(des3_ede) sync speed test

2014-06-09 Thread Jussi Kivilinna
Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index ba247cf..164ec0e 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -1585,6 +1585,12 @@ static int do_test(int m

[PATCH] crypto: des3_ede/x86-64: fix parse warning

2014-06-23 Thread Jussi Kivilinna
: warning: restricted __be64 degrades to integer arch/x86/crypto/des3_ede_glue.c:326:44: warning: restricted __be64 degrades to integer Reported-by: kbuild test robot Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/des3_ede_glue.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] crypto: sha512_ssse3: fix byte count to bit count conversion

2014-06-23 Thread Jussi Kivilinna
/crypto/sha512_ssse3_glue.c:144:17: warning: incorrect type in assignment (different base types) arch/x86/crypto/sha512_ssse3_glue.c:144:17:expected restricted __be64 arch/x86/crypto/sha512_ssse3_glue.c:144:17:got unsigned long long Cc: Tim Chen Signed-off-by: Jussi Kivilinna --- arch

[PATCH 1/2] crypto: sha1/ARM: make use of common SHA-1 structures

2014-06-28 Thread Jussi Kivilinna
Common SHA-1 structures are defined in for code sharing. This patch changes SHA-1/ARM glue code to use these structures. Signed-off-by: Jussi Kivilinna --- arch/arm/crypto/sha1_glue.c | 50 +++ 1 file changed, 22 insertions(+), 28 deletions(-) diff

[PATCH 2/2] crypto: sha1: add ARM NEON implementation

2014-06-28 Thread Jussi Kivilinna
1.36x 819210241.46x 819240961.49x 819281921.49x Signed-off-by: Jussi Kivilinna --- arch/arm/crypto/Makefile |2 arch/arm/crypto/sha1-armv7-neon.S | 635 arch/arm/crypto

[PATCH] crypto: sha512: add ARM NEON implementation

2014-06-28 Thread Jussi Kivilinna
256 3.42x 819210243.56x 819240963.60x 819281923.60x Signed-off-by: Jussi Kivilinna --- arch/arm/crypto/Makefile|2 arch/arm/crypto/sha512-armv7-neon.S | 461

Re: [PATCH 2/2] crypto: sha1: add ARM NEON implementation

2014-06-29 Thread Jussi Kivilinna
On 28.06.2014 23:07, Ard Biesheuvel wrote:> Hi Jussi, > > On 28 June 2014 12:40, Jussi Kivilinna wrote: >> This patch adds ARM NEON assembly implementation of SHA-1 algorithm. >> >> tcrypt benchmark results on Cortex-A8, sha1-arm-asm vs sha1-neon-asm: >> >>

[PATCH 2/2] [v2] crypto: sha1: add ARM NEON implementation

2014-06-29 Thread Jussi Kivilinna
ff-by: Jussi Kivilinna --- arch/arm/crypto/Makefile |2 arch/arm/crypto/sha1-armv7-neon.S | 634 arch/arm/crypto/sha1_glue.c|8 arch/arm/crypto/sha1_neon_glue.c | 197 +++ arch/arm/include/asm/crypto/sha1.h | 10 + crypto/Kc

[PATCH 1/2] [v2] crypto: sha1/ARM: make use of common SHA-1 structures

2014-06-29 Thread Jussi Kivilinna
Common SHA-1 structures are defined in for code sharing. This patch changes SHA-1/ARM glue code to use these structures. Acked-by: Ard Biesheuvel Signed-off-by: Jussi Kivilinna --- arch/arm/crypto/sha1_glue.c | 50 +++ 1 file changed, 22 insertions

[PATCH] [v2] crypto: sha512: add ARM NEON implementation

2014-06-29 Thread Jussi Kivilinna
256 3.42x 819210243.56x 819240963.60x 819281923.60x Changes in v2: - Use ENTRY/ENDPROC - Don't provide Thumb2 version Signed-off-by: Jussi Kivilinna --- arch/arm/crypto/Makefile|2

[PATCH 2/2] [v3] crypto: sha1: add ARM NEON implementation

2014-06-30 Thread Jussi Kivilinna
1.40x 819210241.58x 819240961.63x 819281921.63x Acked-by: Ard Biesheuvel Tested-by: Ard Biesheuvel Signed-off-by: Jussi Kivilinna --- Changes in v2: - Use ENTRY/ENDPROC - Don't provide Thumb2 version - Move con

[PATCH] [v3] crypto: sha512: add ARM NEON implementation

2014-06-30 Thread Jussi Kivilinna
256 3.42x 819210243.56x 819240963.60x 819281923.60x Acked-by: Ard Biesheuvel Tested-by: Ard Biesheuvel Signed-off-by: Jussi Kivilinna --- Changes in v2: - Use ENTRY/ENDPROC - Don't provide Thumb2 ve

[PATCH 1/2] [v3] crypto: sha1/ARM: make use of common SHA-1 structures

2014-06-30 Thread Jussi Kivilinna
Common SHA-1 structures are defined in for code sharing. This patch changes SHA-1/ARM glue code to use these structures. Acked-by: Ard Biesheuvel Signed-off-by: Jussi Kivilinna --- arch/arm/crypto/sha1_glue.c | 50 +++ 1 file changed, 22 insertions

Re: [PATCH] [v3] crypto: sha512: add ARM NEON implementation

2014-06-30 Thread Jussi Kivilinna
On 30.06.2014 21:13, Ard Biesheuvel wrote: > On 30 June 2014 18:39, Jussi Kivilinna wrote: >> This patch adds ARM NEON assembly implementation of SHA-512 and SHA-384 >> algorithms. >> >> tcrypt benchmark results on Cortex-A8, sha512-generic vs sha512-neon-asm: >>

Re: [PATCH] [v3] crypto: sha512: add ARM NEON implementation

2014-07-29 Thread Jussi Kivilinna
On 29.07.2014 15:35, Ard Biesheuvel wrote: > On 30 June 2014 18:39, Jussi Kivilinna wrote: >> This patch adds ARM NEON assembly implementation of SHA-512 and SHA-384 >> algorithms. >> >> tcrypt benchmark results on Cortex-A8, sha512-generic vs sha512-neon-asm: >>

Re: Kernel crypto API: cryptoperf performance measurement

2014-08-19 Thread Jussi Kivilinna
Hello, On 2014-08-17 18:55, Stephan Mueller wrote: > Hi, > > during playing around with the kernel crypto API, I implemented a performance > measurement tool kit for the various kernel crypto API cipher types. The > cryptoperf tool kit is provided in [1]. > > Comments are welcome. Your result

Re: Kernel crypto API: cryptoperf performance measurement

2014-08-20 Thread Jussi Kivilinna
Hello, On 2014-08-19 21:23, Stephan Mueller wrote: > Am Dienstag, 19. August 2014, 10:17:36 schrieb Jussi Kivilinna: > > Hi Jussi, > >> Hello, >> >> On 2014-08-17 18:55, Stephan Mueller wrote: >>> Hi, >>> >>> during playing around wi

Re: Kernel crypto API: cryptoperf performance measurement

2014-08-21 Thread Jussi Kivilinna
On 2014-08-20 21:14, Milan Broz wrote: > On 08/20/2014 03:25 PM, Jussi Kivilinna wrote: >>> One to four GB per second for XTS? 12 GB per second for AES CBC? Somehow >>> that >>> does not sound right. >> >> Agreed, those do not look correct... I wonder

Re: rfc4543 testvectors in testmgr.h kernel

2015-02-10 Thread Jussi Kivilinna
On 10.02.2015 18:22, Marcus Meissner wrote: > Hi Jussi, > > We were trying to use rfc4543(gcm(aes)) in the kernel for FIPS mode, > but the testvectors seem to fail. You probably need to add '.fips_allowed = 1,' in testmgr.c for "rfc4543(gcm(aes))" to enable algorithm in fips mode. > > Did you

Re: [PATCH] crypto/arm: accelerated SHA-512 using ARM generic ASM and NEON

2015-03-28 Thread Jussi Kivilinna
55 + > arch/arm/crypto/sha512_neon_glue.c| 155 +-- > 8 files changed, 2762 insertions(+), 597 deletions(-) > create mode 100644 arch/arm/crypto/sha512-armv4.pl > delete mode 100644 arch/arm/crypto/sha512-armv7-neon.S Acked-by: Jussi Kivilinna > create mode 100644 arch/arm

[[RFC] PATCH 3/4] crypto: tcrypt: add ctr(blowfish) speed test

2011-09-01 Thread Jussi Kivilinna
Add ctr(blowfish) speed test to receive results for blowfish x86_64 assembly patch. Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 617..e353a28 100644 --- a/crypto

[[RFC] PATCH 1/4] crypto: blowfish: split generic and common c code

2011-09-01 Thread Jussi Kivilinna
Patch splits up the blowfish crypto routine into a common part (key setup) which will be used by blowfish crypto modules (x86_64 assembly and generic-c). Also fixes errors/warnings reported by checkpatch. Signed-off-by: Jussi Kivilinna --- crypto/Kconfig| 10 + crypto/Makefile

[[RFC] PATCH 4/4] crypto: blowfish: add x86_64 assembly implementation

2011-09-01 Thread Jussi Kivilinna
mily : 16 model : 10 model name : AMD Phenom(tm) II X6 1055T Processor stepping : 0 Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/Makefile |2 arch/x86/crypto/blowfish-x86_64-asm_64.S | 392 arch/x86/crypto/blowfish_gl

[[RFC] PATCH 2/4] crypto: blowfish: rename C-version to blowfish_generic

2011-09-01 Thread Jussi Kivilinna
Rename blowfish to blowfish_generic so that assembler versions of blowfish cipher can autoload. Module alias 'blowfish' is added. Also fix checkpatch warnings. Signed-off-by: Jussi Kivilinna --- crypto/Makefile |2 - crypto/blowfish.c

Re: [[RFC] PATCH 4/4] crypto: blowfish: add x86_64 assembly implementation

2011-09-19 Thread Jussi Kivilinna
ypted images (ecb/cbc/ctr modes) between patched and unpatched kernels). -Jussi Quoting Jussi Kivilinna : 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

Re: [PATCH 1/4] crypto: blowfish - split generic and common c code

2011-09-22 Thread Jussi Kivilinna
Quoting Herbert Xu : On Fri, Sep 02, 2011 at 01:45:07AM +0300, Jussi Kivilinna wrote: Patch splits up the blowfish crypto routine into a common part (key setup) which will be used by blowfish crypto modules (x86_64 assembly and generic-c). Also fixes errors/warnings reported by checkpatch

[PATCH 1/2] crypto: blowfish-x86_64: improve x86_64 blowfish 4-way performance

2011-09-23 Thread Jussi Kivilinna
F-macro is kept for 1-way functions. Patch cleans up old F-macro as it is no longer needed in 4-way part. Patch also does register macro renaming to reduce stack usage. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/blowfish-x86_64-asm_64.S | 198 +++--- 1 files

[PATCH 2/2] crypto: blowfish-x86_64: add credits

2011-09-23 Thread Jussi Kivilinna
Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/blowfish_glue.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/x86/crypto/blowfish_glue.c b/arch/x86/crypto/blowfish_glue.c index 40911ab..2568a7b 100644 --- a/arch/x86/crypto/blowfish_glue.c +++ b/arch/x86

[PATCH 1/3] crypto: tcrypt: add ctr(twofish) speed test

2011-09-26 Thread Jussi Kivilinna
Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index e353a28..fc35650 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -1039,6 +1039,10 @@ static int do_test(int m

[PATCH 2/3] crypto: twofish-x86-asm: make assembler functions use twofish_ctx instead of crypto_tfm

2011-09-26 Thread Jussi Kivilinna
This needed by 3-way twofish patch to be able to easily use one block assembler functions. As glue code is shared between i586/x86_64 apply change to i586 assembler too. Also export assembler functions for 3-way parallel twofish module. CC: Joachim Fritschi Signed-off-by: Jussi Kivilinna

[PATCH 3/3] crypto: twofish: add 3-way parallel x86_64 assembler implemention

2011-09-26 Thread Jussi Kivilinna
: 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 --- arch/x86/crypto/Makefile |2 arch/x86/crypto/twofish-x86_64-asm_64-3way.S | 316 + arch/x86

[PATCH] crypto: blowfish-x86_64: fix ctr blocksize to 1

2011-10-10 Thread Jussi Kivilinna
Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/blowfish_glue.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/crypto/blowfish_glue.c b/arch/x86/crypto/blowfish_glue.c index 40911ab..dd3964a 100644 --- a/arch/x86/crypto/blowfish_glue.c +++ b/arch/x86/crypto

[PATCH] crypto: twofish-x86_64-3way: fix ctr blocksize to 1

2011-10-10 Thread Jussi Kivilinna
Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/twofish_glue_3way.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/crypto/twofish_glue_3way.c b/arch/x86/crypto/twofish_glue_3way.c index 0cbf9fa..5ede9c4 100644 --- a/arch/x86/crypto/twofish_glue_3way.c

[PATCH] crypto: testmgr: add blowfish test-vectors

2011-10-10 Thread Jussi Kivilinna
Add tests for parallel blowfish-x86_64 code paths. Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |1 crypto/testmgr.c | 15 + crypto/testmgr.h | 172 +- 3 files changed, 184 insertions(+), 4 deletions(-) diff --git a/crypto

[PATCH] crypto: testmgr: add twofish tests

2011-10-10 Thread Jussi Kivilinna
Add tests for parallel twofish-x86_64-3way code paths. Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |1 crypto/testmgr.c | 15 crypto/testmgr.h | 226 +- 3 files changed, 238 insertions(+), 4 deletions(-) diff --git a

[PATCH 0/7] crypto: add SSE2-x86_64/i586 implementation of Serpent cipher

2011-10-17 Thread Jussi Kivilinna
blocks parallel. Series depends on previous testmgr/tcrypt patches in twofish-asm-3way series and also on following patches: http://marc.info/?l=linux-crypto-vger&m=131827700228773&w=2 http://marc.info/?l=linux-crypto-vger&m=131827699228759&w=2 --- Jussi Kivilinna (7):

[PATCH 1/7] crypto: testmgr: add new serpent test vectors

2011-10-17 Thread Jussi Kivilinna
Add new serpent tests for serpent_sse2 x86_64/i586 8-way/4-way code paths. Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |2 crypto/testmgr.c | 30 crypto/testmgr.h | 393 ++ 3 files changed, 423 insertions(+), 2 deletions

[PATCH 2/7] crypto: tcrypt: add test_acipher_speed

2011-10-17 Thread Jussi Kivilinna
Add test_acipher_speed for testing async block ciphers. Also include tests for aes/des/des3/ede as these appear to have ablk_cipher implementations available. Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c | 250 +++ 1 files changed, 250

[PATCH 3/7] crypto: tcrypt: add serpent speed tests

2011-10-17 Thread Jussi Kivilinna
Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index dd3a0f8..5526065 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -1292,6 +1292,21 @@ static int

[PATCH 4/7] crypto: serpent: export common functions for x86_64/i386-sse2 assembler implementations

2011-10-17 Thread Jussi Kivilinna
Serpent SSE2 assembler implementations only provide 4-way/8-way parallel functions and need setkey and one-block encrypt/decrypt functions. CC: Dag Arne Osvik Signed-off-by: Jussi Kivilinna --- crypto/serpent.c | 41 ++--- include/crypto/serpent.h

[PATCH 5/7] crypto: serpent: rename module from serpent to serpent_generic

2011-10-17 Thread Jussi Kivilinna
Rename module from serpent.ko to serpent_generic.ko and add module alias. This is to allow assembler implementation to autoload on 'modprobe serpent'. Also add driver_name and priority for serpent cipher. CC: Dag Arne Osvik Signed-off-by: Jussi Kivilinna --- (I choose not to do

[PATCH 6/7] crypto: serpent: add 8-way parallel x86_64/SSE2 assembler implementation

2011-10-17 Thread Jussi Kivilinna
/serpent-sse2.txt Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/Makefile |2 arch/x86/crypto/serpent-sse2-x86_64-asm_64.S | 761 ++ arch/x86/crypto/serpent_sse2_glue.c | 719 + arch/x86/include/asm/serpent.h

[PATCH 7/7] crypto: serpent: add 4-way parallel i586/SSE2 assembler implementation

2011-10-17 Thread Jussi Kivilinna
/decryption of sse2-i586 vs generic on AMD Phenom II: encrypt: 1.82x decrypt: 2.51x Encryption/decryption of sse2-i586 vs generic on Intel Xeon E7330: encrypt: 2.99x decrypt: 3.48x Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/Makefile |2 arch/x86/crypto/serpent-sse2-i586

[PATCH 00/18] crypto: Add helper functions for parallelized LRW and XTS modes

2011-10-18 Thread Jussi Kivilinna
(). Patches 13-15: add XTS support to serpent-sse2, with tcrypt tests and test vectors. Patches 16-18: add XTS support to twofish-x86_64-3way, with tcrypt tests and test vectors. --- Jussi Kivilinna (18): crypto: lrw: fix memleak crypto: lrw: use blocksize constant crypto: lrw

[PATCH 01/18] crypto: lrw: fix memleak

2011-10-18 Thread Jussi Kivilinna
LRW module leaks child cipher memory when init_tfm() fails because of child block size not being 16. Signed-off-by: Jussi Kivilinna --- crypto/lrw.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/crypto/lrw.c b/crypto/lrw.c index 358f80b..fca3246 100644 --- a/crypto

[PATCH 02/18] crypto: lrw: use blocksize constant

2011-10-18 Thread Jussi Kivilinna
LRW has fixed blocksize of 16. Define LRW_BLOCK_SIZE and use in place of crypto_cipher_blocksize(). Signed-off-by: Jussi Kivilinna --- crypto/lrw.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crypto/lrw.c b/crypto/lrw.c index fca3246..bee6022 100644 --- a

[PATCH 03/18] crypto: lrw: split gf128mul table initialization from setkey

2011-10-18 Thread Jussi Kivilinna
Split gf128mul initialization from setkey so that it can be used outside lrw-module. Signed-off-by: Jussi Kivilinna --- crypto/lrw.c | 61 ++ 1 files changed, 40 insertions(+), 21 deletions(-) diff --git a/crypto/lrw.c b/crypto/lrw.c

[PATCH 04/18] crypto: lrw: add interface for parallelized cipher implementions

2011-10-18 Thread Jussi Kivilinna
Export gf128mul table initialization routines and add lrw_crypt() function that can be used by cipher implementations that can benefit from parallelized cipher operations. Signed-off-by: Jussi Kivilinna --- crypto/lrw.c | 105 -- include

[PATCH 05/18] crypto: testmgr: add lrw(serpent) test vectors

2011-10-18 Thread Jussi Kivilinna
Add test vectors for lrw(serpent). These are generated from lrw(aes) test vectors. Signed-off-by: Jussi Kivilinna --- crypto/testmgr.c | 15 ++ crypto/testmgr.h | 502 ++ 2 files changed, 517 insertions(+), 0 deletions(-) diff --git a

[PATCH 06/18] crypto: tcrypt: add lrw(serpent) tests

2011-10-18 Thread Jussi Kivilinna
Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |9 + crypto/tcrypt.h |1 + 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 5526065..9a9e170 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -996,6 +996,7 @@ static

[PATCH 07/18] crypto: serpent-sse2: add lrw support

2011-10-18 Thread Jussi Kivilinna
2.30x 2.33x Intel Atom N270 (i586): sizelrw-enc lrw-dec 16B 0.97x 0.97x 64B 1.47x 1.50x 256B1.72x 1.69x 1024B 1.88x 1.81x 8192B 1.84x 1.79x Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/serpent_sse2_glue.c | 211 +++ crypto

[PATCH 08/18] crypto: testmgr: add lrw(twofish) test vectors

2011-10-18 Thread Jussi Kivilinna
Add test vectors for lrw(twofish). These are generated from lrw(aes) test vectors. Signed-off-by: Jussi Kivilinna --- crypto/testmgr.c | 15 ++ crypto/testmgr.h | 501 ++ 2 files changed, 516 insertions(+), 0 deletions(-) diff --git a

[PATCH 09/18] crypto: tcrypt: add lrw(twofish) tests

2011-10-18 Thread Jussi Kivilinna
Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 9a9e170..0120383 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -990,6 +990,7 @@ static int do_test(int m

[PATCH 10/18] crypto: twofish-x86_64-3way: add lrw support

2011-10-18 Thread Jussi Kivilinna
64B 1.17x 1.17x 256B1.26x 1.27x 1024B 1.30x 1.31x 8192B 1.31x 1.32x AMD Phenom II 1055T (fam:16, model:10): sizelrw-enc lrw-dec 16B 1.06x 1.01x 64B 1.08x 1.14x 256B1.19x 1.20x 1024B 1.21x 1.22x 8192B 1.23x 1.24x Signed-off-by: Jussi Kivilinna

[PATCH 11/18] crypto: xts: use blocksize constant

2011-10-18 Thread Jussi Kivilinna
XTS has fixed blocksize of 16. Define XTS_BLOCK_SIZE and use in place of crypto_cipher_blocksize(). Signed-off-by: Jussi Kivilinna --- crypto/xts.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crypto/xts.c b/crypto/xts.c index 8517054..96f3f88 100644 --- a

[PATCH 13/18] crypto: testmgr: add xts(serpent) test vectors

2011-10-18 Thread Jussi Kivilinna
Add test vectors for xts(serpent). These are generated from xts(aes) test vectors. Signed-off-by: Jussi Kivilinna --- crypto/testmgr.c | 15 + crypto/testmgr.h | 682 ++ 2 files changed, 697 insertions(+), 0 deletions(-) diff --git a

[PATCH 12/18] crypto: xts: add interface for parallelized cipher implementations

2011-10-18 Thread Jussi Kivilinna
Add xts_crypt() function that can be used by cipher implementations that can benefit from parallelized cipher operations. Signed-off-by: Jussi Kivilinna --- crypto/xts.c | 74 +- include/crypto/xts.h | 27 ++ 2 files

[PATCH 15/18] crypto: serpent-sse2: add xts support

2011-10-18 Thread Jussi Kivilinna
(i586): sizexts-enc xts-dec 16B 0.95x 0.96x 64B 1.53x 1.50x 256B1.72x 1.75x 1024B 1.88x 1.87x 8192B 1.86x 1.83x Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/serpent_sse2_glue.c | 180 +++ 1 files changed, 178 insertions(+), 2

[PATCH 14/18] crypto: tcrypt: add xts(serpent) tests

2011-10-18 Thread Jussi Kivilinna
Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |9 + crypto/tcrypt.h |1 + 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 0120383..a664595 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -998,6 +998,7 @@ static

[PATCH 17/18] crypto: tcrypt: add xts(twofish) tests

2011-10-18 Thread Jussi Kivilinna
Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index a664595..7736a9f 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -991,6 +991,7 @@ static int do_test(int m

[PATCH 16/18] crypto: testmgr: add xts(twofish) test vectors

2011-10-18 Thread Jussi Kivilinna
Add test vectors for xts(twofish). These are generated from xts(twofish) test vectors. Signed-off-by: Jussi Kivilinna --- crypto/testmgr.c | 15 + crypto/testmgr.h | 681 ++ 2 files changed, 696 insertions(+), 0 deletions(-) diff --git a

[PATCH 18/18] crypto: twofish-x86_64-3way: add xts support

2011-10-18 Thread Jussi Kivilinna
64B 1.14x 1.15x 256B1.23x 1.25x 1024B 1.26x 1.29x 8192B 1.28x 1.30x AMD Phenom II 1055T (fam:16, model:10): sizexts-enc xts-dec 16B 1.03x 1.03x 64B 1.13x 1.16x 256B1.20x 1.20x 1024B 1.22x 1.22x 8192B 1.22x 1.21x Signed-off-by: Jussi Kivilinna

[PATCH 0/2] Fixes for parallel XTS/LRW patch series

2011-10-23 Thread Jussi Kivilinna
do-while loop nblocks gets updated correctly. --- Jussi Kivilinna (2): crypto: xts: fix nblocks not being updated in walk loop crypto: lrw: fix nblocks not being updated in walk loop crypto/lrw.c |1 + crypto/xts.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) -- To uns

[PATCH 1/2] crypto: xts: fix nblocks not being updated in walk loop

2011-10-23 Thread Jussi Kivilinna
In xts_crypt() function, nblocks should be updated after blkcipher_walk_done call. Signed-off-by: Jussi Kivilinna --- crypto/xts.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/crypto/xts.c b/crypto/xts.c index 5681d66..ca1608f 100644 --- a/crypto/xts.c +++ b/crypto

[PATCH 2/2] crypto: lrw: fix nblocks not being updated in walk loop

2011-10-23 Thread Jussi Kivilinna
In lrw_crypt() function, nblocks should be updated after blkcipher_walk_done call. Signed-off-by: Jussi Kivilinna --- crypto/lrw.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/crypto/lrw.c b/crypto/lrw.c index 66c4d22..ba42acc 100644 --- a/crypto/lrw.c +++ b/crypto

[PATCH 1/4] [v2] crypto: serpent - add 8-way parallel x86_64/SSE2 assembler implementation

2011-11-09 Thread Jussi Kivilinna
/kernel/crypto/phenom-ii-1055t/serpent-sse2.txt http://koti.mbnet.fi/axh/kernel/crypto/celeron-t1600/serpent-generic.txt http://koti.mbnet.fi/axh/kernel/crypto/celeron-t1600/serpent-sse2.txt Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/Makefile |2 arch/x86/crypto

[PATCH 3/4] crypto: serpent-sse2: add lrw support

2011-11-09 Thread Jussi Kivilinna
2.30x 2.33x Intel Atom N270 (i586): sizelrw-enc lrw-dec 16B 0.97x 0.97x 64B 1.47x 1.50x 256B1.72x 1.69x 1024B 1.88x 1.81x 8192B 1.84x 1.79x Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/serpent_sse2_glue.c | 211 +++ crypto

[PATCH 2/4] crypto: serpent: add 4-way parallel i586/SSE2 assembler implementation

2011-11-09 Thread Jussi Kivilinna
/decryption of sse2-i586 vs generic on AMD Phenom II: encrypt: 1.82x decrypt: 2.51x Encryption/decryption of sse2-i586 vs generic on Intel Xeon E7330: encrypt: 2.99x decrypt: 3.48x Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/Makefile |2 arch/x86/crypto/serpent-sse2-i586

[PATCH 4/4] crypto: serpent-sse2: add xts support

2011-11-09 Thread Jussi Kivilinna
): sizexts-enc xts-dec 16B 0.95x 0.96x 64B 1.53x 1.50x 256B1.72x 1.75x 1024B 1.88x 1.87x 8192B 1.86x 1.83x Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/serpent_sse2_glue.c | 180 +++ 1 files changed, 178 insertions(+), 2

[PATCH] crypto: serpent-sse2 - clear CRYPTO_TFM_REQ_MAY_SLEEP in lrw and xts modes

2011-11-09 Thread Jussi Kivilinna
LRW/XTS patches for serpent-sse2 forgot to add this. CRYPTO_TFM_REQ_MAY_SLEEP should be cleared as sleeping between kernel_fpu_begin()/kernel_fpu_end() is not allowed. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/serpent_sse2_glue.c |4 1 files changed, 4 insertions(+), 0

[PATCH 1/2] crypto: serpent - cleanup checkpatch errors and warnings

2011-11-23 Thread Jussi Kivilinna
Do checkpatch fixes before rename to keep rename patch simple and clean. Signed-off-by: Jussi Kivilinna --- crypto/serpent.c | 603 +++--- 1 files changed, 344 insertions(+), 259 deletions(-) diff --git a/crypto/serpent.c b/crypto/serpent.c

[PATCH 2/2] crypto: serpent - rename serpent.c to serpent_generic.c

2011-11-23 Thread Jussi Kivilinna
Now that serpent.c has been cleaned from checkpatch warnings, we can do clean rename. Signed-off-by: Jussi Kivilinna --- crypto/Makefile |2 crypto/serpent.c | 684 -- crypto/serpent_generic.c | 684

[PATCH] crypto: serpent-sse2 - should select CRYPTO_CRYPTD

2011-11-23 Thread Jussi Kivilinna
Since serpent_sse2_glue.c uses cryptd, CRYPTO_SERPENT_SSE2_X86_64 and CRYPTO_SERPENT_SSE2_586 should be selecting CRYPTO_CRYPTD. Reported-by: Randy Dunlap Signed-off-by: Jussi Kivilinna --- crypto/Kconfig |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/crypto/Kconfig

[PATCH 3.2] crypto: twofish-x86_64-3way - blacklist pentium4 and atom

2011-12-03 Thread Jussi Kivilinna
Performance of twofish-x86_64-3way on Intel Pentium 4 and Atom is lower than of twofish-x86_64 module. So blacklist these CPUs. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/twofish_glue_3way.c | 47 +++ 1 files changed, 47 insertions(+), 0 deletions

[PATCH 3.2] crypto: blowfish-x86_64 - blacklist Pentium 4

2011-12-04 Thread Jussi Kivilinna
Implementation in blowfish-x86_64 uses 64bit rotations which are slow on P4, making blowfish-x86_64 slower than generic C implementation. Therefore blacklist P4. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/blowfish_glue.c | 30 ++ 1 files changed, 30

[PATCH 1/7] crypto - lrw: remove dependency on EXPERIMENTAL

2011-12-13 Thread Jussi Kivilinna
LRW has been EXPERIMENTAL since it was introduced in 2006. I'd say by now it has seen enough testing to justify removal of EXPERIMENTAL tag. CC: Rik Snel Signed-off-by: Jussi Kivilinna --- crypto/Kconfig |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/crypto/Kc

[PATCH 2/7] crypto - xts: remove dependency on EXPERIMENTAL

2011-12-13 Thread Jussi Kivilinna
XTS has been EXPERIMENTAL since it was introduced in 2007. I'd say by now it has seen enough testing to justify removal of EXPERIMENTAL tag. CC: Rik Snel Signed-off-by: Jussi Kivilinna --- crypto/Kconfig |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/crypto/Kc

[PATCH 3/7] crypto - twofish-x86_64-3way: select LRW and XTS

2011-12-13 Thread Jussi Kivilinna
modules. Signed-off-by: Jussi Kivilinna --- crypto/Kconfig |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index a77cd8e..3cd303b 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -876,6 +876,8 @@ config CRYPTO_TWOFISH_X86_64_3WAY

[PATCH 5/7] crypto - serpent-sse2: select LRW and XTS

2011-12-13 Thread Jussi Kivilinna
. Signed-off-by: Jussi Kivilinna --- crypto/Kconfig |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index 3cd303b..d7d4d4e 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -770,6 +770,8 @@ config CRYPTO_SERPENT_SSE2_X86_64 select

[PATCH 4/7] crypto - twofish-x86_64-3way: remove unneeded LRW/XTS #ifdefs

2011-12-13 Thread Jussi Kivilinna
Since LRW & XTS are selected by twofish-x86_64-3way, we don't need these #ifdefs anymore. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/twofish_glue_3way.c | 32 1 files changed, 0 insertions(+), 32 deletions(-) diff --git a/arch/x

[PATCH 7/7] crypto - gf128mul: remove leftover "(EXPERIMENTAL)" in Kconfig

2011-12-13 Thread Jussi Kivilinna
CRYPTO_GF128MUL does not select EXPERIMENTAL anymore so remove the "(EXPERIMENTAL)" from its name. Signed-off-by: Jussi Kivilinna --- crypto/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index d7d4d4e..7ae0d0f 10

[PATCH 6/7] crypto - serpent-sse2: remove unneeded LRW/XTS #ifdefs

2011-12-13 Thread Jussi Kivilinna
Since LRW & XTS are selected by serpent-sse2, we don't need these #ifdefs anymore. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/serpent_sse2_glue.c | 40 --- 1 files changed, 0 insertions(+), 40 deletions(-) diff --git a/arch/x

[PATCH 2/2] crypto: blowfish-x86_64 - blacklist Pentium 4

2011-12-20 Thread Jussi Kivilinna
Implementation in blowfish-x86_64 uses 64bit rotations which are slow on P4, making blowfish-x86_64 slower than generic C implementation. Therefore blacklist P4. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/blowfish_glue.c | 30 ++ 1 files changed, 30

[PATCH 1/2] crypto: twofish-x86_64-3way - blacklist pentium4 and atom

2011-12-20 Thread Jussi Kivilinna
Performance of twofish-x86_64-3way on Intel Pentium 4 and Atom is lower than of twofish-x86_64 module. So blacklist these CPUs. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/twofish_glue_3way.c | 47 +++ 1 files changed, 47 insertions(+), 0 deletions

[PATCH] crypto - serpent-sse2: change transpose_4x4 to only use integer instructions

2011-12-20 Thread Jussi Kivilinna
Matrix transpose macro in serpent-sse2 uses mix of SSE2 integer and SSE floating point instructions, which might cause performance penality on some CPUs. This patch replaces transpose_4x4 macro with version that uses only SSE2 integer instructions. Signed-off-by: Jussi Kivilinna --- arch/x86

Re: [PATCH] crypto: Add bulk algorithm registration interface

2012-01-17 Thread Jussi Kivilinna
Quoting Mark Brown : Hardware crypto engines frequently need to register a selection of different algorithms with the core. Simplify their code slightly, especially the error handling, by providing functions to register a number of algorithms in a single call. Signed-off-by: Mark Brown --- cr

[PATCH 1/6] crypto: serpent-sse2 - use crypto_[un]register_algs

2012-02-17 Thread Jussi Kivilinna
Combine all crypto_alg to be registered and use new crypto_[un]register_algs functions. Simplifies init/exit code and reduce object size. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/serpent_sse2_glue.c | 406 ++- 1 files changed, 163 insertions(+), 243

[PATCH 2/6] crypto: twofish-x86_64-3way - use crypto_[un]register_algs

2012-02-17 Thread Jussi Kivilinna
Combine all crypto_alg to be registered and use new crypto_[un]register_algs functions. Simplifies init/exit code and reduce object size. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/twofish_glue_3way.c | 219 ++- 1 files changed, 89 insertions(+), 130

[PATCH 3/6] crypto: blowfish-x86_64 - use crypto_[un]register_algs

2012-02-17 Thread Jussi Kivilinna
Combine all crypto_alg to be registered and use new crypto_[un]register_algs functions. Simplifies init/exit code and reduce object size. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/blowfish_glue.c | 163 --- 1 files changed, 65 insertions(+), 98

[PATCH 4/6] crypto: serpent-sse2 - combine ablk_*_init functions

2012-02-17 Thread Jussi Kivilinna
Driver name in ablk_*_init functions can be constructed runtime. Therefore use single function ablk_init to reduce object size. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/serpent_sse2_glue.c | 71 ++- 1 files changed, 13 insertions(+), 58 deletions

[PATCH 5/6] crypto: blowfish-x86_64 - set alignmask to zero

2012-02-17 Thread Jussi Kivilinna
x86 has fast unaligned accesses, so blowfish-x86_64 does not need to enforce alignment. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/blowfish_glue.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/crypto/blowfish_glue.c b/arch/x86/crypto/blowfish_glue.c

[PATCH 6/6] crypto: twofish-x86_64/i586 - set alignmask to zero

2012-02-17 Thread Jussi Kivilinna
x86 has fast unaligned accesses, so twofish-x86_64/i586 does not need to enforce alignment. Signed-off-by: Jussi Kivilinna --- arch/x86/crypto/twofish_glue.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/crypto/twofish_glue.c b/arch/x86/crypto/twofish_glue.c

[PATCH] camellia: simplify key setup and CAMELLIA_ROUNDSM macro

2012-03-03 Thread Jussi Kivilinna
es. Quick tcrypt camellia results: x86_64, AMD Phenom II, ~5% faster x86_64, Intel Core 2, ~0.5% faster i386, Intel Atom N270, ~1% faster Signed-off-by: Jussi Kivilinna --- crypto/camellia.c | 24 +++- 1 files changed, 3 insertions(+), 21 deletions(-) diff --git a/crypto/ca

[PATCH 0/6] x86_64 assembler implementation of camellia block cipher

2012-03-05 Thread Jussi Kivilinna
Patches 1-2 add new tests and test vectors for camellia. Patches 3-5 rename 'camellia' module to 'camellia_generic'. Patch 6 adds x86_64 implementation of camellia. Series depends on patch: http://marc.info/?l=linux-crypto-vger&m=133077599602729&w=2 --- Jussi

[PATCH 1/6] crypto: testmgr - add more camellia test vectors

2012-03-05 Thread Jussi Kivilinna
New ECB, CBC, CTR, LRW and XTS test vectors for camellia. Larger ECB/CBC test vectors needed for parallel 2-way camellia implementation. Signed-off-by: Jussi Kivilinna --- crypto/testmgr.c | 45 ++ crypto/testmgr.h | 1383 ++ 2 files changed

[PATCH 2/6] crypto: tcrypt - add more camellia tests

2012-03-05 Thread Jussi Kivilinna
Add tests for CTR, LRW and XTS modes. Signed-off-by: Jussi Kivilinna --- crypto/tcrypt.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 7736a9f..8f147bf 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -1297,6

[PATCH 3/6] crypto: camellia - rename camellia module to camellia_generic

2012-03-05 Thread Jussi Kivilinna
Rename camellia module to camellia_generic to allow optimized assembler implementations to autoload with module-alias. Signed-off-by: Jussi Kivilinna --- crypto/Makefile |3 ++- crypto/camellia.c |1 + 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/crypto/Makefile b

[PATCH 4/6] crypto: camellia - fix checkpatch warnings

2012-03-05 Thread Jussi Kivilinna
Fix checkpatch warnings before renaming file. Signed-off-by: Jussi Kivilinna --- crypto/camellia.c | 79 - 1 files changed, 41 insertions(+), 38 deletions(-) diff --git a/crypto/camellia.c b/crypto/camellia.c index f07a19b..f7f 100644

Re: linux-next: Tree for Mar 15 (crypto)

2012-03-15 Thread Jussi Kivilinna
Quoting Randy Dunlap : On 03/15/2012 12:59 AM, Stephen Rothwell wrote: Hi all, News: the build system (see below) has had its toolchains for most architectures updated to gcc 4.6.3. People might like to check the build results and consider if this change has caused any problems. There are a

  1   2   3   4   >