18 Mar, 2016

1 commit

  • Pull crypto update from Herbert Xu:
    "Here is the crypto update for 4.6:

    API:
    - Convert remaining crypto_hash users to shash or ahash, also convert
    blkcipher/ablkcipher users to skcipher.
    - Remove crypto_hash interface.
    - Remove crypto_pcomp interface.
    - Add crypto engine for async cipher drivers.
    - Add akcipher documentation.
    - Add skcipher documentation.

    Algorithms:
    - Rename crypto/crc32 to avoid name clash with lib/crc32.
    - Fix bug in keywrap where we zero the wrong pointer.

    Drivers:
    - Support T5/M5, T7/M7 SPARC CPUs in n2 hwrng driver.
    - Add PIC32 hwrng driver.
    - Support BCM6368 in bcm63xx hwrng driver.
    - Pack structs for 32-bit compat users in qat.
    - Use crypto engine in omap-aes.
    - Add support for sama5d2x SoCs in atmel-sha.
    - Make atmel-sha available again.
    - Make sahara hashing available again.
    - Make ccp hashing available again.
    - Make sha1-mb available again.
    - Add support for multiple devices in ccp.
    - Improve DMA performance in caam.
    - Add hashing support to rockchip"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits)
    crypto: qat - remove redundant arbiter configuration
    crypto: ux500 - fix checks of error code returned by devm_ioremap_resource()
    crypto: atmel - fix checks of error code returned by devm_ioremap_resource()
    crypto: qat - Change the definition of icp_qat_uof_regtype
    hwrng: exynos - use __maybe_unused to hide pm functions
    crypto: ccp - Add abstraction for device-specific calls
    crypto: ccp - CCP versioning support
    crypto: ccp - Support for multiple CCPs
    crypto: ccp - Remove check for x86 family and model
    crypto: ccp - memset request context to zero during import
    lib/mpi: use "static inline" instead of "extern inline"
    lib/mpi: avoid assembler warning
    hwrng: bcm63xx - fix non device tree compatibility
    crypto: testmgr - allow rfc3686 aes-ctr variants in fips mode.
    crypto: qat - The AE id should be less than the maximal AE number
    lib/mpi: Endianness fix
    crypto: rockchip - add hash support for crypto engine in rk3288
    crypto: xts - fix compile errors
    crypto: doc - add skcipher API documentation
    crypto: doc - update AEAD AD handling
    ...

    Linus Torvalds
     

06 Feb, 2016

1 commit


27 Jan, 2016

1 commit

  • The has_key logic is wrong for shash algorithms as they always
    have a setkey function. So we should instead be testing against
    shash_no_setkey.

    Fixes: a5596d633278 ("crypto: hash - Add crypto_ahash_has_setkey")
    Cc: stable@vger.kernel.org
    Reported-by: Stephan Mueller
    Signed-off-by: Herbert Xu
    Tested-by: Stephan Mueller

    Herbert Xu
     

18 Jan, 2016

1 commit


21 Apr, 2015

1 commit


08 Jun, 2014

1 commit

  • __attribute__((aligned)) applies the default alignment for the largest scalar
    type for the target ABI. gcc allows it to be applied inline to a defined type.
    Clang only allows it to be applied to a type definition (PR11071).

    Making it into 2 lines makes it more readable and works with both compilers.

    Author: Mark Charlebois
    Signed-off-by: Mark Charlebois
    Signed-off-by: Behan Webster

    Mark Charlebois
     

19 Feb, 2013

1 commit

  • Three errors resulting in kernel memory disclosure:

    1/ The structures used for the netlink based crypto algorithm report API
    are located on the stack. As snprintf() does not fill the remainder of
    the buffer with null bytes, those stack bytes will be disclosed to users
    of the API. Switch to strncpy() to fix this.

    2/ crypto_report_one() does not initialize all field of struct
    crypto_user_alg. Fix this to fix the heap info leak.

    3/ For the module name we should copy only as many bytes as
    module_name() returns -- not as much as the destination buffer could
    hold. But the current code does not and therefore copies random data
    from behind the end of the module name, as the module name is always
    shorter than CRYPTO_MAX_ALG_NAME.

    Also switch to use strncpy() to copy the algorithm's name and
    driver_name. They are strings, after all.

    Signed-off-by: Mathias Krause
    Cc: Steffen Klassert
    Signed-off-by: Herbert Xu

    Mathias Krause
     

01 Aug, 2012

1 commit


02 Apr, 2012

1 commit


20 Mar, 2012

1 commit


11 Nov, 2011

1 commit


21 Oct, 2011

1 commit


05 Nov, 2010

1 commit


19 May, 2010

1 commit


24 Jul, 2009

1 commit


22 Jul, 2009

1 commit

  • 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
     

15 Jul, 2009

2 commits


14 Jul, 2009

7 commits


12 Jul, 2009

1 commit


11 Jul, 2009

2 commits


08 Jul, 2009

6 commits


27 Mar, 2009

1 commit


18 Feb, 2009

2 commits

  • This is based on a report and patch by Geert Uytterhoeven.

    The functions crypto_alloc_tfm and create_create_tfm return a
    pointer that needs to be adjusted by the caller when successful
    and otherwise an error value. This means that the caller has
    to check for the error and only perform the adjustment if the
    pointer returned is valid.

    Since all callers want to make the adjustment and we know how
    to adjust it ourselves, it's much easier to just return adjusted
    pointer directly.

    The only caveat is that we have to return a void * instead of
    struct crypto_tfm *. However, this isn't that bad because both
    of these functions are for internal use only (by types code like
    shash.c, not even algorithms code).

    This patch also moves crypto_alloc_tfm into crypto/internal.h
    (crypto_create_tfm is already there) to reflect this.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • We're currently checking the frontend type in init_tfm. This is
    completely pointless because the fact that we're called at all
    means that the frontend is ours so the type must match as well.

    Signed-off-by: Herbert Xu

    Herbert Xu
     

05 Feb, 2009

1 commit


25 Dec, 2008

2 commits