06 Aug, 2009

3 commits

  • cryptd_alloc_ahash() will allocate a cryptd-ed ahash for specified
    algorithm name. The new allocated one is guaranteed to be cryptd-ed
    ahash, so the shash underlying can be gotten via cryptd_ahash_child().

    Signed-off-by: Huang Ying
    Signed-off-by: Herbert Xu

    Huang Ying
     
  • Remove the dedicated GHASH implementation in GCM, and uses the GHASH
    digest algorithm instead. This will make GCM uses hardware accelerated
    GHASH implementation automatically if available.

    ahash instead of shash interface is used, because some hardware
    accelerated GHASH implementation needs asynchronous interface.

    Signed-off-by: Huang Ying
    Signed-off-by: Herbert Xu

    Huang Ying
     
  • GHASH is implemented as a shash algorithm. The actual implementation
    is copied from gcm.c. This makes it possible to add
    architecture/hardware accelerated GHASH implementation.

    Signed-off-by: Huang Ying
    Signed-off-by: Herbert Xu

    Huang Ying
     

05 Aug, 2009

1 commit


24 Jul, 2009

5 commits

  • The aligned ctx helper was using a bogus alignment value thas was
    one off the correct value. Fortunately the current users do not
    require anything beyond the natural alignment of the platform so
    this hasn't caused a problem.

    This patch fixes that and also removes the unnecessary minimum
    check since if the alignment is less than the natural alignment
    then the subsequent ALIGN operation should be a noop.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • This patch uses crypto_shash_export/crypto_shash_import to prehash
    ipad/opad to speed up hmac. This is partly based on a similar patch
    by Steffen Klassert.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • It's undefined behaviour in C to write outside the bounds of an array.
    The key expansion routine takes a shortcut of creating 8 words at a
    time, but this creates 4 additional words which don't fit in the array.

    As everyone is hopefully now aware, GCC is at liberty to make any
    assumptions and optimisations it likes in situations where it can
    detect that UB has occured, up to and including nasal demons, and
    as the indices being accessed in the array are trivially calculable,
    it's rash to invite gcc to do take any liberties at all.

    Signed-off-by: Phil Carmody
    Signed-off-by: Herbert Xu

    Phil Carmody
     
  • crypto_init_shash_ops_async() tests for setkey and not for import
    before exporting the algorithms import function to ahash.
    This patch fixes this.

    Signed-off-by: Steffen Klassert
    Signed-off-by: Herbert Xu

    Steffen Klassert
     
  • ahash_op_unaligned() and ahash_def_finup() allocate memory atomically,
    regardless whether the request can sleep or not. This patch changes
    this to use GFP_KERNEL if the request can sleep.

    Signed-off-by: Steffen Klassert
    Signed-off-by: Herbert Xu

    Steffen Klassert
     

22 Jul, 2009

7 commits

  • This patch provides a default export/import function for all
    shash algorithms. It simply copies the descriptor context as
    is done by sha1_generic.

    This in essence means that all existing shash algorithms now
    support export/import. This is something that will be depended
    upon in implementations such as hmac. Therefore all new shash
    and ahash implementations must support export/import.

    For those that cannot obtain a partial result, padlock-sha's
    fallback model should be used so that a partial result is always
    available.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • This patch adds export/import support to sha512-s390 (which includes
    sha384-s390). The exported type is defined by struct sha512_state,
    which is basically the entire descriptor state of sha512_generic.

    Since sha512-s390 only supports a 64-bit byte count the import
    function will reject anything that exceeds that.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • This patch replaces the 32-bit counters in sha512_generic with
    64-bit counters. It also switches the bit count to the simpler
    byte count.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • This patch renames struct sha512_ctx and exports it as struct
    sha512_state so that other sha512 implementations can use it
    as the reference structure for exporting their state.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • Although xcbc was converted to shash, it didn't obey the new
    requirement that all hash state must be stored in the descriptor
    rather than the transform.

    This patch fixes this issue and also optimises away the rekeying
    by precomputing K2 and K3 within setkey.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • This patch replaces the local xor function with the generic
    crypto_xor function.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • This patch adds the finup/export/import functions to the cryptd
    ahash implementation. We simply invoke the underlying shash
    operations.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

16 Jul, 2009

2 commits


15 Jul, 2009

9 commits


14 Jul, 2009

13 commits