1. 22 4月, 2015 2 次提交
  2. 25 8月, 2014 1 次提交
    • T
      crypto: sha-mb - multibuffer crypto infrastructure · 1e65b81a
      Tim Chen 提交于
      This patch introduces the multi-buffer crypto daemon which is responsible
      for submitting crypto jobs in a work queue to the responsible multi-buffer
      crypto algorithm.  The idea of the multi-buffer algorihtm is to put
      data streams from multiple jobs in a wide (AVX2) register and then
      take advantage of SIMD instructions to do crypto computation on several
      buffers simultaneously.
      
      The multi-buffer crypto daemon is also responsbile for flushing the
      remaining buffers to complete the computation if no new buffers arrive
      for a while.
      Signed-off-by: NTim Chen <tim.c.chen@linux.intel.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      1e65b81a
  3. 20 6月, 2014 1 次提交
  4. 21 5月, 2014 1 次提交
    • H
      crypto: hash - Add real ahash walk interface · 75ecb231
      Herbert Xu 提交于
      Although the existing hash walk interface has already been used
      by a number of ahash crypto drivers, it turns out that none of
      them were really asynchronous.  They were all essentially polling
      for completion.
      
      That's why nobody has noticed until now that the walk interface
      couldn't work with a real asynchronous driver since the memory
      is mapped using kmap_atomic.
      
      As we now have a use-case for a real ahash implementation on x86,
      this patch creates a minimal ahash walk interface.  Basically it
      just calls kmap instead of kmap_atomic and does away with the
      crypto_yield call.  Real ahash crypto drivers don't need to yield
      since by definition they won't be hogging the CPU.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      75ecb231
  5. 01 8月, 2012 1 次提交
  6. 29 3月, 2012 1 次提交
  7. 29 8月, 2009 1 次提交
  8. 15 7月, 2009 1 次提交
  9. 14 7月, 2009 8 次提交
  10. 09 7月, 2009 1 次提交
  11. 08 7月, 2009 6 次提交
  12. 04 3月, 2009 1 次提交
    • G
      crypto: compress - Add pcomp interface · a1d2f095
      Geert Uytterhoeven 提交于
      The current "comp" crypto interface supports one-shot (de)compression only,
      i.e. the whole data buffer to be (de)compressed must be passed at once, and
      the whole (de)compressed data buffer will be received at once.
      In several use-cases (e.g. compressed file systems that store files in big
      compressed blocks), this workflow is not suitable.
      Furthermore, the "comp" type doesn't provide for the configuration of
      (de)compression parameters, and always allocates workspace memory for both
      compression and decompression, which may waste memory.
      
      To solve this, add a "pcomp" partial (de)compression interface that provides
      the following operations:
        - crypto_compress_{init,update,final}() for compression,
        - crypto_decompress_{init,update,final}() for decompression,
        - crypto_{,de}compress_setup(), to configure (de)compression parameters
          (incl. allocating workspace memory).
      
      The (de)compression methods take a struct comp_request, which was mimicked
      after the z_stream object in zlib, and contains buffer pointer and length
      pairs for input and output.
      
      The setup methods take an opaque parameter pointer and length pair. Parameters
      are supposed to be encoded using netlink attributes, whose meanings depend on
      the actual (name of the) (de)compression algorithm.
      Signed-off-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      a1d2f095
  13. 25 12月, 2008 3 次提交
    • H
      crypto: hash - Export shash through hash · 5f7082ed
      Herbert Xu 提交于
      This patch allows shash algorithms to be used through the old hash
      interface.  This is a transitional measure so we can convert the
      underlying algorithms to shash before converting the users across.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5f7082ed
    • H
      crypto: hash - Add import/export interface · dec8b786
      Herbert Xu 提交于
      It is often useful to save the partial state of a hash function
      so that it can be used as a base for two or more computations.
      
      The most prominent example is HMAC where all hashes start from
      a base determined by the key.  Having an import/export interface
      means that we only have to compute that base once rather than
      for each message.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      dec8b786
    • H
      crypto: hash - Add shash interface · 7b5a080b
      Herbert Xu 提交于
      The shash interface replaces the current synchronous hash interface.
      It improves over hash in two ways.  Firstly shash is reentrant,
      meaning that the same tfm may be used by two threads simultaneously
      as all hashing state is stored in a local descriptor.
      
      The other enhancement is that shash no longer takes scatter list
      entries.  This is because shash is specifically designed for
      synchronous algorithms and as such scatter lists are unnecessary.
      
      All existing hash users will be converted to shash once the
      algorithms have been completely converted.
      
      There is also a new finup function that combines update with final.
      This will be extended to ahash once the algorithm conversion is
      done.
      
      This is also the first time that an algorithm type has their own
      registration function.  Existing algorithm types will be converted
      to this way in due course.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      7b5a080b
  14. 29 8月, 2008 2 次提交
  15. 10 7月, 2008 2 次提交
  16. 08 3月, 2008 1 次提交
  17. 23 2月, 2008 1 次提交
  18. 11 1月, 2008 6 次提交
    • H
      [CRYPTO] chainiv: Avoid lock spinning where possible · e7cd2514
      Herbert Xu 提交于
      This patch makes chainiv avoid spinning by postponing requests on lock
      contention if the user allows the use of asynchronous algorithms.  If
      a synchronous algorithm is requested then we behave as before.
      
      This should improve IPsec performance on SMP when two CPUs attempt to
      transmit over the same SA.  Currently one of them will spin doing nothing
      waiting for the other CPU to finish its encryption.  This patch makes it
      postpone the request and get on with other work.
      
      If only one CPU is transmitting for a given SA, then we will process
      the request synchronously as before.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e7cd2514
    • H
      [CRYPTO] null: Add null blkcipher algorithm · 3631c650
      Herbert Xu 提交于
      This patch adds a null blkcipher algorithm called ecb(cipher_null) for
      backwards compatibility.  Previously the null algorithm when used by
      IPsec copied the data byte by byte.  This new algorithm optimises that
      to a straight memcpy which lets us better measure inherent overheads in
      our IPsec code.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      3631c650
    • H
      [CRYPTO] aead: Create default givcipher instances · d29ce988
      Herbert Xu 提交于
      This patch makes crypto_alloc_aead always return algorithms that is
      capable of generating their own IVs through givencrypt and givdecrypt.
      All existing AEAD algorithms already do.  New ones must either supply
      their own or specify a generic IV generator with the geniv field.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      d29ce988
    • H
      [CRYPTO] aead: Add aead_geniv_alloc/aead_geniv_free · 5b6d2d7f
      Herbert Xu 提交于
      This patch creates the infrastructure to help the construction of IV
      generator templates that wrap around AEAD algorithms by adding an IV
      generator to them.  This is useful for AEAD algorithms with no built-in
      IV generator or to replace their built-in generator.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5b6d2d7f
    • H
      [CRYPTO] skcipher: Create default givcipher instances · b9c55aa4
      Herbert Xu 提交于
      This patch makes crypto_alloc_ablkcipher/crypto_grab_skcipher always
      return algorithms that are capable of generating their own IVs through
      givencrypt and givdecrypt.  Each algorithm may specify its default IV
      generator through the geniv field.
      
      For algorithms that do not set the geniv field, the blkcipher layer will
      pick a default.  Currently it's chainiv for synchronous algorithms and
      eseqiv for asynchronous algorithms.  Note that if these wrappers do not
      work on an algorithm then that algorithm must specify its own geniv or
      it can't be used at all.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      b9c55aa4
    • H
      [CRYPTO] skcipher: Added skcipher_givcrypt_complete · 15c67286
      Herbert Xu 提交于
      This patch adds the helper skcipher_givcrypt_complete which should be
      called when an ablkcipher algorithm has completed a givcrypt request.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      15c67286