Skip to content

Commit

Permalink
[CRYPTO] camellia: Code cleanup
Browse files Browse the repository at this point in the history
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: Denys Vlasenko <vda.linux@googlemail.com>
Acked-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Denys Vlasenko authored and Herbert Xu committed Jan 10, 2008
1 parent e2b21b5 commit 1721a81
Showing 1 changed file with 426 additions and 540 deletions.
Loading

0 comments on commit 1721a81

Please sign in to comment.