All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] camellia: code shrink and 64-bit optimization
@ 2007-11-22 22:41 Denys Vlasenko
  2007-11-22 22:43 ` [PATCH 2/5] camellia: code shrink #2 Denys Vlasenko
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Denys Vlasenko @ 2007-11-22 22:41 UTC (permalink / raw)
  To: Denys Vlasenko, herbert, Noriaki TAKAMIYA, davem, linux-crypto

Patches start from 5 because pathches 1..4 are already
in cryptodev-2.6.

camellia5:
        Remove unused macro params.
        Use (u8)(expr) instead of (expr) & 0xff,
        helps gcc to realize how to use simpler commands.
        Move CAMELLIA_FLS macro closer to encrypt/decrypt routines.

camellia6:
        unifies encrypt/decrypt routines for different key lengths.
        This reduces module size by ~25%, with tiny (less than 1%)
        speed impact.
        Also collapses encrypt/decrypt into more readable
        (visually shorter) form using macros.

camellia7:
        Move "key XOR is end of F-function" code part into
        camellia_setup_tail(), it is sufficiently similar
        between camellia_setup128 and camellia_setup256.

camellia8:
        Analogously to camellia7 patch, move
        "absorb kw2 to other subkeys" and "absorb kw4 to other subkeys"
        code parts into camellia_setup_tail(). This further reduces
        source and object code size at the cost of two brances
        in key setup code.

camellia9:
        Adds 64-bit key setup, it is used if BITS_PER_LONG is 64.
        30% faster key setup and 1k (7%) smaller module on amd64.

Code sizes:
64-bit:
dec      hex   filename
22786    5902  2.6.23.1.camellia4.t64/crypto/camellia.o
15670    3d36  2.6.23.1.camellia9.t64/crypto/camellia.o

32-bit:
29948    74fc  2.6.23.1.camellia4.t/crypto/camellia.o
18454    4816  2.6.23.1.camellia9.t/crypto/camellia.o

These patches apply cleanly to current cryptodev-2.6.
They should be applied in order.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-11-23 13:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-22 22:41 [PATCH 0/5] camellia: code shrink and 64-bit optimization Denys Vlasenko
2007-11-22 22:43 ` [PATCH 2/5] camellia: code shrink #2 Denys Vlasenko
2007-11-23 13:12   ` Herbert Xu
2007-11-22 22:43 ` [PATCH 3/5] camellia: code shrink #3 Denys Vlasenko
2007-11-23 13:14   ` Herbert Xu
2007-11-22 22:44 ` [PATCH 4/5] camellia: code shrink #4 Denys Vlasenko
2007-11-23 13:22   ` Herbert Xu
2007-11-22 22:44 ` [PATCH 5/5] camellia: 64-bit optimization Denys Vlasenko
2007-11-22 22:45 ` [PATCH 1/5] camellia: code shrink Denys Vlasenko
2007-11-23 13:06   ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.