- 11 1月, 2008 4 次提交
-
-
由 Denys Vlasenko 提交于
Move huge unrolled pieces of code (3 screenfuls) at the end of 128/256 key setup routines into common camellia_setup_tail(), convert it to loop there. Loop is still unrolled six times, so performance hit is very small, code size win is big. Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com> Acked-by: NNoriaki TAKAMIYA <takamiya@po.ntts.co.jp> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Denys Vlasenko 提交于
Optimize GETU32 to use 4-byte memcpy (modern gcc will convert such memcpy to single move instruction on i386). Original GETU32 did four byte fetches, and shifted/XORed those. Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com> Acked-by: NNoriaki TAKAMIYA <takamiya@po.ntts.co.jp> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Denys Vlasenko 提交于
Rename some macros to shorter names: CAMELLIA_RR8 -> ROR8, making it easier to understand that it is just a right rotation, nothing camellia-specific in it. CAMELLIA_SUBKEY_L() -> SUBKEY_L() - just shorter. Move be32 <-> cpu conversions out of en/decrypt128/256 and into camellia_en/decrypt - no reason to have that code duplicated twice. Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com> Acked-by: NNoriaki TAKAMIYA <takamiya@po.ntts.co.jp> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
由 Denys Vlasenko 提交于
Move code blocks around so that related pieces are closer together: e.g. CAMELLIA_ROUNDSM macro does not need to be separated from the rest of the code by huge array of constants. Remove unused macros (COPY4WORD, SWAP4WORD, XOR4WORD[2]) Drop SUBL(), SUBR() macros which only obscure things. Same for CAMELLIA_SP1110() macro and KEY_TABLE_TYPE typedef. Remove useless comments: /* encryption */ -- well it's obvious enough already! void camellia_encrypt128(...) Combine swap with copying at the beginning/end of encrypt/decrypt. Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com> Acked-by: NNoriaki TAKAMIYA <takamiya@po.ntts.co.jp> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-
- 07 2月, 2007 1 次提交
-
-
由 Noriaki TAKAMIYA 提交于
This patch adds the main code of Camellia cipher algorithm. Signed-off-by: NNoriaki TAKAMIYA <takamiya@po.ntts.co.jp> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
-