Skip to content
Snippets Groups Projects
  1. Jan 10, 2008
    • Herbert Xu's avatar
      [CRYPTO] skcipher: Added geniv field · 23508e11
      Herbert Xu authored
      
      This patch introduces the geniv field which indicates the default IV
      generator for each algorithm.  It should point to a string that is not
      freed as long as the algorithm is registered.
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      23508e11
    • Herbert Xu's avatar
      [CRYPTO] scatterwalk: Move scatterwalk.h to linux/crypto · 42c271c6
      Herbert Xu authored
      
      The scatterwalk infrastructure is used by algorithms so it needs to
      move out of crypto for future users that may live in drivers/crypto
      or asm/*/crypto.
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      42c271c6
    • Herbert Xu's avatar
      [CRYPTO] ablkcipher: Add distinct ABLKCIPHER type · 332f8840
      Herbert Xu authored
      
      Up until now we have ablkcipher algorithms have been identified as
      type BLKCIPHER with the ASYNC bit set.  This is suboptimal because
      ablkcipher refers to two things.  On the one hand it refers to the
      top-level ablkcipher interface with requests.  On the other hand it
      refers to and algorithm type underneath.
      
      As it is you cannot request a synchronous block cipher algorithm
      with the ablkcipher interface on top.  This is a problem because
      we want to be able to eventually phase out the blkcipher top-level
      interface.
      
      This patch fixes this by making ABLKCIPHER its own type, just as
      we have distinct types for HASH and DIGEST.  The type it associated
      with the algorithm implementation only.
      
      Which top-level interface is used for synchronous block ciphers is
      then determined by the mask that's used.  If it's a specific mask
      then the old blkcipher interface is given, otherwise we go with the
      new ablkcipher interface.
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      332f8840
  2. Oct 10, 2007
  3. Sep 10, 2007
  4. Sep 09, 2007
    • Herbert Xu's avatar
      [CRYPTO] blkcipher: Fix handling of kmalloc page straddling · e4630f9f
      Herbert Xu authored
      
      The function blkcipher_get_spot tries to return a buffer of
      the specified length that does not straddle a page.  It has
      an off-by-one bug so it may advance a page unnecessarily.
      
      What's worse, one of its callers doesn't provide a buffer
      that's sufficiently long for this operation.
      
      This patch fixes both problems.  Thanks to Bob Gilligan for
      diagnosing this problem and providing a fix.
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      e4630f9f
  5. Aug 06, 2007
  6. Jul 11, 2007
  7. May 01, 2007
    • Herbert Xu's avatar
      [CRYPTO] api: Add async block cipher interface · 32e3983f
      Herbert Xu authored
      
      This patch adds the frontend interface for asynchronous block ciphers.
      In addition to the usual block cipher parameters, there is a callback
      function pointer and a data pointer.  The callback will be invoked only
      if the encrypt/decrypt handlers return -EINPROGRESS.  In other words,
      if the return value of zero the completion handler (or the equivalent
      code) needs to be invoked by the caller.
      
      The request structure is allocated and freed by the caller.  Its size
      is determined by calling crypto_ablkcipher_reqsize().  The helpers
      ablkcipher_request_alloc/ablkcipher_request_free can be used to manage
      the memory for a request.
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      32e3983f
    • Herbert Xu's avatar
      [CRYPTO] api: Proc functions should be marked as unused · 03f5d8ce
      Herbert Xu authored
      
      The proc functions were incorrectly marked as used rather than unused.
      They may be unused if proc is disabled.
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      03f5d8ce
  8. Feb 06, 2007
  9. Dec 13, 2006
  10. Sep 20, 2006
    • Herbert Xu's avatar
      [CRYPTO] cipher: Added block cipher type · 5cde0af2
      Herbert Xu authored
      
      This patch adds the new type of block ciphers.  Unlike current cipher
      algorithms which operate on a single block at a time, block ciphers
      operate on an arbitrarily long linear area of data.  As it is block-based,
      it will skip any data remaining at the end which cannot form a block.
      
      The block cipher has one major difference when compared to the existing
      block cipher implementation.  The sg walking is now performed by the
      algorithm rather than the cipher mid-layer.  This is needed for drivers
      that directly support sg lists.  It also improves performance for all
      algorithms as it reduces the total number of indirect calls by one.
      
      In future the existing cipher algorithm will be converted to only have
      a single-block interface.  This will be done after all existing users
      have switched over to the new block cipher type.
      
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      5cde0af2
Loading