1. 24 4月, 2015 1 次提交
  2. 10 4月, 2015 3 次提交
  3. 01 4月, 2015 1 次提交
  4. 31 3月, 2015 11 次提交
  5. 16 3月, 2015 1 次提交
  6. 13 3月, 2015 2 次提交
    • J
      crypto: don't export static symbol · 05713ba9
      Julia Lawall 提交于
      The semantic patch that fixes this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      type T;
      identifier f;
      @@
      
      static T f (...) { ... }
      
      @@
      identifier r.f;
      declarer name EXPORT_SYMBOL_GPL;
      @@
      
      -EXPORT_SYMBOL_GPL(f);
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      05713ba9
    • S
      crypto: aesni - fix memory usage in GCM decryption · ccfe8c3f
      Stephan Mueller 提交于
      The kernel crypto API logic requires the caller to provide the
      length of (ciphertext || authentication tag) as cryptlen for the
      AEAD decryption operation. Thus, the cipher implementation must
      calculate the size of the plaintext output itself and cannot simply use
      cryptlen.
      
      The RFC4106 GCM decryption operation tries to overwrite cryptlen memory
      in req->dst. As the destination buffer for decryption only needs to hold
      the plaintext memory but cryptlen references the input buffer holding
      (ciphertext || authentication tag), the assumption of the destination
      buffer length in RFC4106 GCM operation leads to a too large size. This
      patch simply uses the already calculated plaintext size.
      
      In addition, this patch fixes the offset calculation of the AAD buffer
      pointer: as mentioned before, cryptlen already includes the size of the
      tag. Thus, the tag does not need to be added. With the addition, the AAD
      will be written beyond the already allocated buffer.
      
      Note, this fixes a kernel crash that can be triggered from user space
      via AF_ALG(aead) -- simply use the libkcapi test application
      from [1] and update it to use rfc4106-gcm-aes.
      
      Using [1], the changes were tested using CAVS vectors to demonstrate
      that the crypto operation still delivers the right results.
      
      [1] http://www.chronox.de/libkcapi.html
      
      CC: Tadeusz Struk <tadeusz.struk@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NStephan Mueller <smueller@chronox.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      ccfe8c3f
  7. 28 2月, 2015 1 次提交
  8. 27 2月, 2015 1 次提交
  9. 14 1月, 2015 1 次提交
    • T
      crypto: aesni - Add support for 192 & 256 bit keys to AESNI RFC4106 · e31ac32d
      Timothy McCaffrey 提交于
      These patches fix the RFC4106 implementation in the aesni-intel
      module so it supports 192 & 256 bit keys.
      
      Since the AVX support that was added to this module also only
      supports 128 bit keys, and this patch only affects the SSE
      implementation, changes were also made to use the SSE version
      if key sizes other than 128 are specified.
      
      RFC4106 specifies that 192 & 256 bit keys must be supported (section
      8.4).
      
      Also, this should fix Strongswan issue 341 where the aesni module
      needs to be unloaded if 256 bit keys are used:
      
      http://wiki.strongswan.org/issues/341
      
      This patch has been tested with Sandy Bridge and Haswell processors.
      With 128 bit keys and input buffers > 512 bytes a slight performance
      degradation was noticed (~1%).  For input buffers of less than 512
      bytes there was no performance impact.  Compared to 128 bit keys,
      256 bit key size performance is approx. .5 cycles per byte slower
      on Sandy Bridge, and .37 cycles per byte slower on Haswell (vs.
      SSE code).
      
      This patch has also been tested with StrongSwan IPSec connections
      where it worked correctly.
      
      I created this diff from a git clone of crypto-2.6.git.
      
      Any questions, please feel free to contact me.
      Signed-off-by: NTimothy McCaffrey <timothy.mccaffrey@unisys.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      e31ac32d
  10. 13 1月, 2015 2 次提交
  11. 05 1月, 2015 2 次提交
    • V
      crypto: sha-mb - Add avx2_supported check. · 0b8c960c
      Vinson Lee 提交于
      This patch fixes this allyesconfig target build error with older
      binutils.
      
        LD      arch/x86/crypto/built-in.o
      ld: arch/x86/crypto/sha-mb/built-in.o: No such file: No such file or directory
      
      Cc: stable@vger.kernel.org # 3.18+
      Signed-off-by: NVinson Lee <vlee@twitter.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      0b8c960c
    • M
      crypto: aesni - fix "by8" variant for 128 bit keys · 0b1e95b2
      Mathias Krause 提交于
      The "by8" counter mode optimization is broken for 128 bit keys with
      input data longer than 128 bytes. It uses the wrong key material for
      en- and decryption.
      
      The key registers xkey0, xkey4, xkey8 and xkey12 need to be preserved
      in case we're handling more than 128 bytes of input data -- they won't
      get reloaded after the initial load. They must therefore be (a) loaded
      on the first iteration and (b) be preserved for the latter ones. The
      implementation for 128 bit keys does not comply with (a) nor (b).
      
      Fix this by bringing the implementation back to its original source
      and correctly load the key registers and preserve their values by
      *not* re-using the registers for other purposes.
      
      Kudos to James for reporting the issue and providing a test case
      showing the discrepancies.
      Reported-by: NJames Yonan <james@openvpn.net>
      Cc: Chandramouli Narayanan <mouli@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v3.18
      Signed-off-by: NMathias Krause <minipli@googlemail.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      0b1e95b2
  12. 02 12月, 2014 1 次提交
  13. 26 11月, 2014 1 次提交
  14. 25 11月, 2014 1 次提交
  15. 24 11月, 2014 1 次提交
  16. 06 11月, 2014 1 次提交
    • V
      crypto: aesni - remove unnecessary #define · 304576a7
      Valentin Rothberg 提交于
      The CPP identifier 'HAS_PCBC' is defined when the Kconfig
      option CRYPTO_PCBC is set as 'y' or 'm', and is further
      used in two ifdef blocks to conditionally compile source
      code. This indirection hides the actual Kconfig dependency
      and complicates readability. Moreover, it's inconsistent
      with the rest of the ifdef blocks in the file, which
      directly reference Kconfig options.
      
      This patch removes 'HAS_PCBC' and replaces its occurrences
      with the actual dependency on 'CRYPTO_PCBC' being set as
      'y' or 'm'.
      Signed-off-by: NValentin Rothberg <valentinrothberg@gmail.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      304576a7
  17. 02 10月, 2014 3 次提交
  18. 24 9月, 2014 1 次提交
  19. 26 8月, 2014 1 次提交
  20. 25 8月, 2014 4 次提交