1. 24 Apr, 2017 1 commit
  2. 21 Apr, 2017 1 commit
  3. 10 Apr, 2017 1 commit
    • Herbert Xu's avatar
      crypto: ahash - Fix EINPROGRESS notification callback · ef0579b6
      Herbert Xu authored
      The ahash API modifies the request's callback function in order
      to clean up after itself in some corner cases (unaligned final
      and missing finup).
      
      When the request is complete ahash will restore the original
      callback and everything is fine.  However, when the request gets
      an EBUSY on a full queue, an EINPROGRESS callback is made while
      the request is still ongoing.
      
      In this case the ahash API will incorrectly call its own callback.
      
      This patch fixes the problem by creating a temporary request
      object on the stack which is used to relay EINPROGRESS back to
      the original completion function.
      
      This patch also adds code to preserve the original flags value.
      
      Fixes: ab6bf4e5 ("crypto: hash - Fix the pointer voodoo in...")
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarSabrina Dubroca <sd@queasysnail.net>
      Tested-by: default avatarSabrina Dubroca <sd@queasysnail.net>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      ef0579b6
  4. 30 Dec, 2016 1 commit
    • Ard Biesheuvel's avatar
      crypto: skcipher - introduce walksize attribute for SIMD algos · c821f6ab
      Ard Biesheuvel authored
      In some cases, SIMD algorithms can only perform optimally when
      allowed to operate on multiple input blocks in parallel. This is
      especially true for bit slicing algorithms, which typically take
      the same amount of time processing a single block or 8 blocks in
      parallel. However, other SIMD algorithms may benefit as well from
      bigger strides.
      
      So add a walksize attribute to the skcipher algorithm definition, and
      wire it up to the skcipher walk API. To avoid confusion between the
      skcipher and AEAD attributes, rename the skcipher_walk chunksize
      attribute to 'stride', and set it from the walksize (in the skcipher
      case) or from the chunksize (in the AEAD case).
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      c821f6ab
  5. 01 Dec, 2016 1 commit
  6. 28 Nov, 2016 2 commits
  7. 01 Nov, 2016 2 commits
  8. 25 Oct, 2016 2 commits
  9. 21 Oct, 2016 1 commit
  10. 18 Jul, 2016 5 commits
  11. 05 Jul, 2016 1 commit
  12. 23 Jun, 2016 2 commits
  13. 15 Jun, 2016 1 commit
  14. 06 Feb, 2016 2 commits
  15. 27 Jan, 2016 1 commit
  16. 09 Dec, 2015 2 commits
  17. 14 Oct, 2015 1 commit
  18. 21 Aug, 2015 1 commit
    • Herbert Xu's avatar
      crypto: skcipher - Add top-level skcipher interface · 7a7ffe65
      Herbert Xu authored
      This patch introduces the crypto skcipher interface which aims
      to replace both blkcipher and ablkcipher.
      
      It's very similar to the existing ablkcipher interface.  The
      main difference is the removal of the givcrypt interface.  In
      order to make the transition easier for blkcipher users, there
      is a helper SKCIPHER_REQUEST_ON_STACK which can be used to place
      a request on the stack for synchronous transforms.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      7a7ffe65
  19. 17 Aug, 2015 2 commits
  20. 14 Jul, 2015 2 commits
  21. 22 Jun, 2015 1 commit
    • Herbert Xu's avatar
      crypto: rng - Do not free default RNG when it becomes unused · 7cecadb7
      Herbert Xu authored
      Currently we free the default RNG when its use count hits zero.
      This was OK when the IV generators would latch onto the RNG at
      instance creation time and keep it until the instance is torn
      down.
      
      Now that IV generators only keep the RNG reference during init
      time this scheme causes the default RNG to come and go at a high
      frequencey.  This is highly undesirable as we want to keep a single
      RNG in use unless the admin wants it to be removed.
      
      This patch changes the scheme so that the system RNG once allocated
      is never removed unless a specifically requested.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      7cecadb7
  22. 19 Jun, 2015 1 commit
    • Herbert Xu's avatar
      crypto: aead - Fix aead_instance struct size · f5d8660a
      Herbert Xu authored
      The struct aead_instance is meant to extend struct crypto_instance
      by incorporating the extra members of struct aead_alg.  However,
      the current layout which is copied from shash/ahash does not specify
      the struct fully.  In particular only aead_alg is present.
      
      For shash/ahash this works because users there add extra headroom
      to sizeof(struct crypto_instance) when allocating the instance.
      Unfortunately for aead, this bit was lost when the new aead_instance
      was added.
      
      Rather than fixing it like shash/ahash, this patch simply expands
      struct aead_instance to contain what is supposed to be there, i.e.,
      adding struct crypto_instance.
      
      In order to not break existing AEAD users, this is done through an
      anonymous union.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      f5d8660a
  23. 17 Jun, 2015 2 commits
  24. 03 Jun, 2015 3 commits
  25. 28 May, 2015 1 commit