24 Nov, 2014

1 commit

  • 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
    Signed-off-by: Herbert Xu

    Kees Cook
     

20 Jun, 2014

1 commit

  • Patch adds x86_64 assembly implementation of Triple DES EDE cipher algorithm.
    Two assembly implementations are provided. First is regular 'one-block at
    time' encrypt/decrypt function. Second is 'three-blocks at time' function that
    gains performance increase on out-of-order CPUs.

    tcrypt test results:

    Intel Core i5-4570:

    des3_ede-asm vs des3_ede-generic:
    size ecb-enc ecb-dec cbc-enc cbc-dec ctr-enc ctr-dec
    16B 1.21x 1.22x 1.27x 1.36x 1.25x 1.25x
    64B 1.98x 1.96x 1.23x 2.04x 2.01x 2.00x
    256B 2.34x 2.37x 1.21x 2.40x 2.38x 2.39x
    1024B 2.50x 2.47x 1.22x 2.51x 2.52x 2.51x
    8192B 2.51x 2.53x 1.21x 2.56x 2.54x 2.55x

    Signed-off-by: Jussi Kivilinna
    Signed-off-by: Herbert Xu

    Jussi Kivilinna
     

01 Aug, 2012

1 commit


07 Oct, 2010

1 commit


16 Feb, 2010

1 commit


25 Dec, 2008

1 commit

  • While its a slightly insane to bypass the key1 == key2 ||
    key2 == key3 check in triple-des, since it reduces it to the
    same strength as des, some folks do need to do this from time
    to time for backwards compatibility with des.

    My own case is FIPS CAVS test vectors. Many triple-des test
    vectors use a single key, replicated 3x. In order to get the
    expected results, des3_ede_setkey() needs to only reject weak
    keys if the CRYPTO_TFM_REQ_WEAK_KEY flag is set.

    Also sets a more appropriate RES flag when a weak key is found.

    Signed-off-by: Jarod Wilson
    Signed-off-by: Herbert Xu

    Jarod Wilson
     

21 Apr, 2008

1 commit

  • On Thu, Mar 27, 2008 at 03:40:36PM +0100, Bodo Eggert wrote:
    > Kamalesh Babulal wrote:
    >
    > > This patch cleanups the crypto code, replaces the init() and fini()
    > > with the _init/_fini
    >
    > This part ist OK.
    >
    > > or init/fini_ (if the
    > > _init/_fini exist)
    >
    > Having init_foo and foo_init won't be a good thing, will it? I'd start
    > confusing them.
    >
    > What about foo_modinit instead?

    Thanks for the suggestion, the init() is replaced with

    _mod_init ()

    and fini () is replaced with _mod_fini.

    Signed-off-by: Kamalesh Babulal
    Signed-off-by: Herbert Xu

    Kamalesh Babulal
     

11 Jan, 2008

2 commits


11 Oct, 2007

1 commit

  • Loading the crypto algorithm by the alias instead of by module directly
    has the advantage that all possible implementations of this algorithm
    are loaded automatically and the crypto API can choose the best one
    depending on its priority.

    Signed-off-by: Sebastian Siewior
    Signed-off-by: Herbert Xu

    Sebastian Siewior