1. 07 3月, 2019 1 次提交
  2. 15 2月, 2019 3 次提交
  3. 08 2月, 2019 1 次提交
  4. 01 2月, 2019 1 次提交
  5. 10 1月, 2019 1 次提交
  6. 20 11月, 2018 1 次提交
    • E
      crypto: chacha20-generic - refactor to allow varying number of rounds · 1ca1b917
      Eric Biggers 提交于
      In preparation for adding XChaCha12 support, rename/refactor
      chacha20-generic to support different numbers of rounds.  The
      justification for needing XChaCha12 support is explained in more detail
      in the patch "crypto: chacha - add XChaCha12 support".
      
      The only difference between ChaCha{8,12,20} are the number of rounds
      itself; all other parts of the algorithm are the same.  Therefore,
      remove the "20" from all definitions, structures, functions, files, etc.
      that will be shared by all ChaCha versions.
      
      Also make ->setkey() store the round count in the chacha_ctx (previously
      chacha20_ctx).  The generic code then passes the round count through to
      chacha_block().  There will be a ->setkey() function for each explicitly
      allowed round count; the encrypt/decrypt functions will be the same.  I
      decided not to do it the opposite way (same ->setkey() function for all
      round counts, with different encrypt/decrypt functions) because that
      would have required more boilerplate code in architecture-specific
      implementations of ChaCha and XChaCha.
      Reviewed-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NMartin Willi <martin@strongswan.org>
      Signed-off-by: NEric Biggers <ebiggers@google.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      1ca1b917
  7. 16 11月, 2018 3 次提交
  8. 17 10月, 2018 1 次提交
  9. 21 9月, 2018 1 次提交
    • H
      crypto: caam/jr - fix ablkcipher_edesc pointer arithmetic · 13cc6f48
      Horia Geantă 提交于
      In some cases the zero-length hw_desc array at the end of
      ablkcipher_edesc struct requires for 4B of tail padding.
      
      Due to tail padding and the way pointers to S/G table and IV
      are computed:
      	edesc->sec4_sg = (void *)edesc + sizeof(struct ablkcipher_edesc) +
      			 desc_bytes;
      	iv = (u8 *)edesc->hw_desc + desc_bytes + sec4_sg_bytes;
      first 4 bytes of IV are overwritten by S/G table.
      
      Update computation of pointer to S/G table to rely on offset of hw_desc
      member and not on sizeof() operator.
      
      Cc: <stable@vger.kernel.org> # 4.13+
      Fixes: 115957bb ("crypto: caam - fix IV DMA mapping and updating")
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      13cc6f48
  10. 04 9月, 2018 3 次提交
  11. 21 4月, 2018 2 次提交
  12. 31 3月, 2018 1 次提交
  13. 15 2月, 2018 1 次提交
  14. 28 12月, 2017 2 次提交
  15. 22 9月, 2017 1 次提交
  16. 18 7月, 2017 1 次提交
    • H
      crypto: caam/qi - fix compilation with DEBUG enabled · 972b812b
      Horia Geantă 提交于
      caam/qi driver does not compile when DEBUG is enabled
      (CRYPTO_DEV_FSL_CAAM_DEBUG=y):
      
      drivers/crypto/caam/caamalg_qi.c: In function 'ablkcipher_done':
      drivers/crypto/caam/caamalg_qi.c:794:2: error: implicit declaration of function 'dbg_dump_sg' [-Werror=implicit-function-declaration]
        dbg_dump_sg(KERN_ERR, "dst    @" __stringify(__LINE__)": ",
      
      Since dbg_dump_sg() is shared between caam/jr and caam/qi, move it
      in a shared location and export it.
      
      At the same time:
      -reduce ifdeferry by providing a no-op implementation for !DEBUG case
      -rename it to caam_dump_sg() to be consistent in terms of
      exported symbols namespace (caam_*)
      
      Cc: <stable@vger.kernel.org>
      Fixes: b189817c ("crypto: caam/qi - add ablkcipher and authenc algorithms")
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      972b812b
  17. 12 7月, 2017 1 次提交
    • D
      crypto: caam - properly set IV after {en,de}crypt · 854b06f7
      David Gstir 提交于
      Certain cipher modes like CTS expect the IV (req->info) of
      ablkcipher_request (or equivalently req->iv of skcipher_request) to
      contain the last ciphertext block when the {en,de}crypt operation is done.
      This is currently not the case for the CAAM driver which in turn breaks
      e.g. cts(cbc(aes)) when the CAAM driver is enabled.
      
      This patch fixes the CAAM driver to properly set the IV after the
      {en,de}crypt operation of ablkcipher finishes.
      
      This issue was revealed by the changes in the SW CTS mode in commit
      0605c41c ("crypto: cts - Convert to skcipher")
      
      Cc: <stable@vger.kernel.org> # 4.8+
      Signed-off-by: NDavid Gstir <david@sigma-star.at>
      Reviewed-by: NHoria Geantă <horia.geanta@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      854b06f7
  18. 22 6月, 2017 2 次提交
  19. 24 3月, 2017 1 次提交
  20. 15 2月, 2017 5 次提交
  21. 01 12月, 2016 1 次提交
    • A
      crypto: caam - pass key buffers with typesafe pointers · 9c0bc511
      Arnd Bergmann 提交于
      The 'key' field is defined as a 'u64' and used for two different
      pieces of information: either to store a pointer or a dma_addr_t.
      The former leads to a build error on 32-bit machines:
      
      drivers/crypto/caam/caamalg_desc.c: In function 'cnstr_shdsc_aead_null_encap':
      drivers/crypto/caam/caamalg_desc.c:67:27: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      drivers/crypto/caam/caamalg_desc.c: In function 'cnstr_shdsc_aead_null_decap':
      drivers/crypto/caam/caamalg_desc.c:143:27: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      
      Using a union to provide correct types gets rid of the warnings
      and as well as a couple of redundant casts.
      
      Fixes: db57656b ("crypto: caam - group algorithm related params")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      9c0bc511
  22. 28 11月, 2016 6 次提交