Subject: group common used functions in software AES modules, take 2

This is almost a repost of an earlier series. I got rid of the
aes_common module and the x86_64 selects the generic version.

Sebastian


Subject: [PATCH 1/3] [crypto] aes_generic coding style cleanup


Signed-off-by: Sebastian Siewior <[email protected]>
---
crypto/aes_generic.c | 325 +++++++++++++++++++++++++++-----------------------
1 files changed, 176 insertions(+), 149 deletions(-)


Attachments:
d8a5da7eb76091108f7ab821be966ba6185393c3.diff (12.65 kB)
Subject: [PATCH 2/3] [crypto] aes_generic: make key generation export able


This patch exports four tables and the set_key() routine. This ressources
can be shared by other AES implementations (aes-x86_64 for instance).
The decryption key has been turned around (deckey[0] is the first piece
of the key instead of deckey[keylen+20]). The encrypt/decrypt functions
are looking now identical (except they are using different tables and
key).

Signed-off-by: Sebastian Siewior <[email protected]>
---
crypto/aes_generic.c | 249 ++++++++++++++++++++++++--------------------------
include/crypto/aes.h | 16 +++
2 files changed, 136 insertions(+), 129 deletions(-)


Attachments:
1b03590d6d2583d1b512070b3832986c3467d70d.diff (13.40 kB)
Subject: [PATCH 3/3] [crypto] AES x86_64, remove setkey


The setkey() function can be shared with the generic algorithm.

Signed-off-by: Sebastian Siewior <[email protected]>
---
arch/x86/crypto/aes-x86_64-asm_64.S | 68 ++++----
arch/x86/crypto/aes_64.c | 282 +----------------------------------
crypto/Kconfig | 1 +
3 files changed, 38 insertions(+), 313 deletions(-)


Attachments:
b2f9732b8efdc29821732c09822b02c4fa2762d4.diff (11.97 kB)

2007-11-08 13:26:36

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH 3/3] [crypto] AES x86_64, remove setkey

On Sun, Oct 28, 2007 at 01:30:09PM +0100, Sebastian Siewior wrote:
>
> The setkey() function can be shared with the generic algorithm.
>
> Signed-off-by: Sebastian Siewior <[email protected]>

Beautiful. All applied. Thanks Sebastian!
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Subject: Re: [PATCH 3/3] [crypto] AES x86_64, remove setkey

* Herbert Xu | 2007-11-08 21:26:33 [+0800]:

>On Sun, Oct 28, 2007 at 01:30:09PM +0100, Sebastian Siewior wrote:
>>
>> The setkey() function can be shared with the generic algorithm.
>>
>> Signed-off-by: Sebastian Siewior <[email protected]>
>
>Beautiful. All applied. Thanks Sebastian!
thx. There is also one for i586 (if you are in merge mode :))

Sebastian