]> git.ipfire.org Git - people/arne_f/kernel.git/commit - crypto/camellia_generic.c
crypto: camellia - simplify key setup and CAMELLIA_ROUNDSM macro
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Sat, 3 Mar 2012 11:59:00 +0000 (13:59 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 14 Mar 2012 09:25:54 +0000 (17:25 +0800)
commitc9b56d33b03e9d5cd5f9d8598b56e9c84386844a
tree6c9224ca235a9ef9aa662e4d104d67c56956915a
parent894042648902d11d579af2a936a5a9a43cd5f1e4
crypto: camellia - simplify key setup and CAMELLIA_ROUNDSM macro

camellia_setup_tail() applies 'inverse of the last half of P-function' to
subkeys, which is unneeded if keys are applied directly to yl/yr in
CAMELLIA_ROUNDSM.

Patch speeds up key setup and should speed up CAMELLIA_ROUNDSM as applying
key to yl/yr early has less register dependencies.

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 <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/camellia.c