- 21 May, 2019 1 commit
-
-
Thomas Gleixner authored
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but...
-
- 18 Apr, 2019 1 commit
-
-
Eric Biggers authored
Use subsys_initcall for registration of all templates and generic algorithm implementations, rather than module_init. Then change cryptomgr to use arch_initcall, to place it before the subsys_initcalls. This is needed so that when both a generic and optimized implementation of an algorithm are built into the kernel (not loadable modules), the generic implementation is registered before the optimized one. Otherwise, the self-tests for the optimized implementation are unable to allocate the generic implementation for the new comparison fuzz tests. Note that on arm, a side effect of this change is that self-tests for generic implementations may run before the unaligned access handler has been installed. So, unaligned accesses will crash the kernel. This is arguably a good thing as it makes it easier to detect that type of bug. Signed-off-by:
Eric Biggers <ebiggers@google.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 29 Nov, 2017 1 commit
-
-
Martin Kepplinger authored
A few years ago the FSF moved and "59 Temple Place" is wrong. Having this still in our source files feels old and unmaintained. Let's take the license statement serious and not confuse users. As https://www.gnu.org/licenses/gpl-howto.html suggests, we replace the postal address with "<http://www.gnu.org/licenses/ >". Signed-off-by:
Martin Kepplinger <martink@posteo.de> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 13 Jan, 2015 1 commit
-
-
Mathias Krause authored
Commit 5d26a105 ("crypto: prefix module autoloading with "crypto-"") changed the automatic module loading when requesting crypto algorithms to prefix all module requests with "crypto-". This requires all crypto modules to have a crypto specific module alias even if their file name would otherwise match the requested crypto algorithm. Even though commit 5d26a105 added those aliases for a vast amount of modules, it was missing a few. Add the required MODULE_ALIAS_CRYPTO annotations to those files to make them get loaded automatically, again. This fixes, e.g., requesting 'ecb(blowfish-generic)', which used to work with kernels v3.18 and below. Also change MODULE_ALIAS() lines to MODULE_ALIAS_CRYPTO(). The former won't work for crypto modules any more. Fixes: 5d26a105 ("crypto: prefix module autoloading with "crypto-"") Cc: Kees Cook <keescook@chromium.org> Signed-off-by:
Mathias Krause <minipli@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor....
-
- 24 Nov, 2014 1 commit
-
-
Kees Cook authored
This prefixes all crypto module loading with "crypto-" so we never run the risk of exposing module auto-loading to userspace via a crypto API, as demonstrated by Mathias Krause: https://lkml.org/lkml/2013/3/4/70 Signed-off-by:
Kees Cook <keescook@chromium.org> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 21 Aug, 2013 1 commit
-
-
Julia Lawall authored
Adjust alignment and replace commas by semicolons in automatically generated code. Signed-off-by:
Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 01 Aug, 2012 1 commit
-
-
Jussi Kivilinna authored
Initialization of cra_list is currently mixed, most ciphers initialize this field and most shashes do not. Initialization however is not needed at all since cra_list is initialized/overwritten in __crypto_register_alg() with list_add(). Therefore perform cleanup to remove all unneeded initializations of this field in 'crypto/'. Signed-off-by:
Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 14 Mar, 2012 4 commits
-
-
Jussi Kivilinna authored
Signed-off-by:
Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jussi Kivilinna authored
Fix checkpatch warnings before renaming file. Signed-off-by:
Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jussi Kivilinna authored
Rename camellia module to camellia_generic to allow optimized assembler implementations to autoload with module-alias. Signed-off-by:
Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Jussi Kivilinna authored
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>
-
- 16 Feb, 2010 1 commit
-
-
Richard Hartmann authored
Signed-off-by:
Richard Hartmann <richih.mailinglist@gmail.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 25 Dec, 2008 1 commit
-
-
Harvey Harrison authored
Remove the private implementation of 32-bit rotation and unaligned access with byteswapping. As a bonus, fixes sparse warnings: crypto/camellia.c:602:2: warning: cast to restricted __be32 crypto/camellia.c:603:2: warning: cast to restricted __be32 crypto/camellia.c:604:2: warning: cast to restricted __be32 crypto/camellia.c:605:2: warning: cast to restricted __be32 crypto/camellia.c:710:2: warning: cast to restricted __be32 crypto/camellia.c:711:2: warning: cast to restricted __be32 crypto/camellia.c:712:2: warning: cast to restricted __be32 crypto/camellia.c:713:2: warning: cast to restricted __be32 crypto/camellia.c:714:2: warning: cast to restricted __be32 crypto/camellia.c:715:2: warning: cast to restricted __be32 crypto/camellia.c:716:2: warning: cast to restricted __be32 crypto/camellia.c:717:2: warning: cast to restricted __be32 [Thanks to Tomoyuki Okazaki for spotting the typo] Tested-by:
Carlo E. Prelz <fluido@fluido.as> Signed-off-by:
Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 08 Sep, 2008 1 commit
-
-
Herbert Xu authored
This reverts commit bd699f2d , which causes camellia to fail the included self-test vectors. It has also been confirmed that it breaks existing encrypted disks using camellia. Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 10 Jul, 2008 1 commit
-
-
Harvey Harrison authored
Remove the private implementation of 32-bit rotation and unaligned access with byteswapping. As a bonus, fixes sparse warnings: crypto/camellia.c:602:2: warning: cast to restricted __be32 crypto/camellia.c:603:2: warning: cast to restricted __be32 crypto/camellia.c:604:2: warning: cast to restricted __be32 crypto/camellia.c:605:2: warning: cast to restricted __be32 crypto/camellia.c:710:2: warning: cast to restricted __be32 crypto/camellia.c:711:2: warning: cast to restricted __be32 crypto/camellia.c:712:2: warning: cast to restricted __be32 crypto/camellia.c:713:2: warning: cast to restricted __be32 crypto/camellia.c:714:2: warning: cast to restricted __be32 crypto/camellia.c:715:2: warning: cast to restricted __be32 crypto/camellia.c:716:2: warning: cast to restricted __be32 crypto/camellia.c:717:2: warning: cast to restricted __be32 Signed-off-by:
Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
- 10 Jan, 2008 8 commits
-
-
Denys Vlasenko authored
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. Signed-off-by:
Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Denys Vlasenko authored
Move "key XOR is end of F-function" code part into camellia_setup_tail(), it is sufficiently similar between camellia_setup128 and camellia_setup256. Signed-off-by:
Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Denys Vlasenko authored
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. Signed-off-by:
Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Denys Vlasenko authored
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. Signed-off-by:
Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-
Denys Vlasenko authored
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:
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>
-
Denys Vlasenko authored
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:
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>
-
Denys Vlasenko authored
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:
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>
-
Denys Vlasenko authored
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>
-
- 06 Feb, 2007 1 commit
-
-
Noriaki TAKAMIYA authored
This patch adds the main code of Camellia cipher algorithm. Signed-off-by:
Noriaki TAKAMIYA <takamiya@po.ntts.co.jp> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au>
-