Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto updates from Herbert Xu: "Here is the crypto update for 4.14: API: - Defer scompress scratch buffer allocation to first use. - Add __crypto_xor that takes separte src and dst operands. - Add ahash multiple registration interface. - Revamped aead/skcipher algif code to fix async IO properly. Drivers: - Add non-SIMD fallback code path on ARM for SVE. - Add AMD Security Processor framework for ccp. - Add support for RSA in ccp. - Add XTS-AES-256 support for CCP version 5. - Add support for PRNG in sun4i-ss. - Add support for DPAA2 in caam. - Add ARTPEC crypto support. - Add Freescale RNGC hwrng support. - Add Microchip / Atmel ECC driver. - Add support for STM32 HASH module" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits) crypto: af_alg - get_page upon reassignment to TX SGL crypto: cavium/nitrox - Fix an error handling path in 'nitrox_probe()' crypto: inside-secure - fix an error handling path in safexcel_probe() crypto: rockchip - Don't dequeue the request when device is busy crypto: cavium - add release_firmware to all return case crypto: sahara - constify platform_device_id MAINTAINERS: Add ARTPEC crypto maintainer crypto: axis - add ARTPEC-6/7 crypto accelerator driver crypto: hash - add crypto_(un)register_ahashes() dt-bindings: crypto: add ARTPEC crypto crypto: algif_aead - fix comment regarding memory layout crypto: ccp - use dma_mapping_error to check map error lib/mpi: fix build with clang crypto: sahara - Remove leftover from previous used spinlock crypto: sahara - Fix dma unmap direction crypto: af_alg - consolidation of duplicate code crypto: caam - Remove unused dentry members crypto: ccp - select CONFIG_CRYPTO_RSA crypto: ccp - avoid uninitialized variable warning crypto: serpent - improve __serpent_setkey with UBSAN ...
This commit is contained in:
@@ -758,9 +758,8 @@ static int crypt_iv_tcw_whitening(struct crypt_config *cc,
|
||||
int i, r;
|
||||
|
||||
/* xor whitening with sector number */
|
||||
memcpy(buf, tcw->whitening, TCW_WHITENING_SIZE);
|
||||
crypto_xor(buf, (u8 *)§or, 8);
|
||||
crypto_xor(&buf[8], (u8 *)§or, 8);
|
||||
crypto_xor_cpy(buf, tcw->whitening, (u8 *)§or, 8);
|
||||
crypto_xor_cpy(&buf[8], tcw->whitening + 8, (u8 *)§or, 8);
|
||||
|
||||
/* calculate crc32 for every 32bit part and xor it */
|
||||
desc->tfm = tcw->crc32_tfm;
|
||||
@@ -805,10 +804,10 @@ static int crypt_iv_tcw_gen(struct crypt_config *cc, u8 *iv,
|
||||
}
|
||||
|
||||
/* Calculate IV */
|
||||
memcpy(iv, tcw->iv_seed, cc->iv_size);
|
||||
crypto_xor(iv, (u8 *)§or, 8);
|
||||
crypto_xor_cpy(iv, tcw->iv_seed, (u8 *)§or, 8);
|
||||
if (cc->iv_size > 8)
|
||||
crypto_xor(&iv[8], (u8 *)§or, cc->iv_size - 8);
|
||||
crypto_xor_cpy(&iv[8], tcw->iv_seed + 8, (u8 *)§or,
|
||||
cc->iv_size - 8);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
Viittaa uudesa ongelmassa
Block a user