aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 16:40:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 16:40:17 -0400
commitbbce2ad2d711c12d93145a7bbdf086e73f414bcd (patch)
tree35432a39f68f4c5df44ed38037cbf05adadb923e /include/linux
parent0f776dc377f6c87f4e4d4a5f63602f33fb93b31e (diff)
parent0f95e2ffc58f5d32a90eb1051d17aeebc21cf91d (diff)
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.8: API: - first part of skcipher low-level conversions - add KPP (Key-agreement Protocol Primitives) interface. Algorithms: - fix IPsec/cryptd reordering issues that affects aesni - RSA no longer does explicit leading zero removal - add SHA3 - add DH - add ECDH - improve DRBG performance by not doing CTR by hand Drivers: - add x86 AVX2 multibuffer SHA256/512 - add POWER8 optimised crc32c - add xts support to vmx - add DH support to qat - add RSA support to caam - add Layerscape support to caam - add SEC1 AEAD support to talitos - improve performance by chaining requests in marvell/cesa - add support for Araneus Alea I USB RNG - add support for Broadcom BCM5301 RNG - add support for Amlogic Meson RNG - add support Broadcom NSP SoC RNG" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (180 commits) crypto: vmx - Fix aes_p8_xts_decrypt build failure crypto: vmx - Ignore generated files crypto: vmx - Adding support for XTS crypto: vmx - Adding asm subroutines for XTS crypto: skcipher - add comment for skcipher_alg->base crypto: testmgr - Print akcipher algorithm name crypto: marvell - Fix wrong flag used for GFP in mv_cesa_dma_add_iv_op crypto: nx - off by one bug in nx_of_update_msc() crypto: rsa-pkcs1pad - fix rsa-pkcs1pad request struct crypto: scatterwalk - Inline start/map/done crypto: scatterwalk - Remove unnecessary BUG in scatterwalk_start crypto: scatterwalk - Remove unnecessary advance in scatterwalk_pagedone crypto: scatterwalk - Fix test in scatterwalk_done crypto: api - Optimise away crypto_yield when hard preemption is on crypto: scatterwalk - add no-copy support to copychunks crypto: scatterwalk - Remove scatterwalk_bytes_sglen crypto: omap - Stop using crypto scatterwalk_bytes_sglen crypto: skcipher - Remove top-level givcipher interface crypto: user - Remove crypto_lookup_skcipher call crypto: cts - Convert to skcipher ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/crypto.h31
-rw-r--r--include/linux/mpi.h3
2 files changed, 8 insertions, 26 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 6e28c895c376..7cee5551625b 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -47,16 +47,18 @@
47#define CRYPTO_ALG_TYPE_AEAD 0x00000003 47#define CRYPTO_ALG_TYPE_AEAD 0x00000003
48#define CRYPTO_ALG_TYPE_BLKCIPHER 0x00000004 48#define CRYPTO_ALG_TYPE_BLKCIPHER 0x00000004
49#define CRYPTO_ALG_TYPE_ABLKCIPHER 0x00000005 49#define CRYPTO_ALG_TYPE_ABLKCIPHER 0x00000005
50#define CRYPTO_ALG_TYPE_SKCIPHER 0x00000005
50#define CRYPTO_ALG_TYPE_GIVCIPHER 0x00000006 51#define CRYPTO_ALG_TYPE_GIVCIPHER 0x00000006
51#define CRYPTO_ALG_TYPE_DIGEST 0x00000008 52#define CRYPTO_ALG_TYPE_KPP 0x00000008
52#define CRYPTO_ALG_TYPE_HASH 0x00000008
53#define CRYPTO_ALG_TYPE_SHASH 0x00000009
54#define CRYPTO_ALG_TYPE_AHASH 0x0000000a
55#define CRYPTO_ALG_TYPE_RNG 0x0000000c 53#define CRYPTO_ALG_TYPE_RNG 0x0000000c
56#define CRYPTO_ALG_TYPE_AKCIPHER 0x0000000d 54#define CRYPTO_ALG_TYPE_AKCIPHER 0x0000000d
55#define CRYPTO_ALG_TYPE_DIGEST 0x0000000e
56#define CRYPTO_ALG_TYPE_HASH 0x0000000e
57#define CRYPTO_ALG_TYPE_SHASH 0x0000000e
58#define CRYPTO_ALG_TYPE_AHASH 0x0000000f
57 59
58#define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e 60#define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e
59#define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c 61#define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000e
60#define CRYPTO_ALG_TYPE_BLKCIPHER_MASK 0x0000000c 62#define CRYPTO_ALG_TYPE_BLKCIPHER_MASK 0x0000000c
61 63
62#define CRYPTO_ALG_LARVAL 0x00000010 64#define CRYPTO_ALG_LARVAL 0x00000010
@@ -486,8 +488,6 @@ struct ablkcipher_tfm {
486 unsigned int keylen); 488 unsigned int keylen);
487 int (*encrypt)(struct ablkcipher_request *req); 489 int (*encrypt)(struct ablkcipher_request *req);
488 int (*decrypt)(struct ablkcipher_request *req); 490 int (*decrypt)(struct ablkcipher_request *req);
489 int (*givencrypt)(struct skcipher_givcrypt_request *req);
490 int (*givdecrypt)(struct skcipher_givcrypt_request *req);
491 491
492 struct crypto_ablkcipher *base; 492 struct crypto_ablkcipher *base;
493 493
@@ -712,23 +712,6 @@ static inline u32 crypto_skcipher_mask(u32 mask)
712 * state information is unused by the kernel crypto API. 712 * state information is unused by the kernel crypto API.
713 */ 713 */
714 714
715/**
716 * crypto_alloc_ablkcipher() - allocate asynchronous block cipher handle
717 * @alg_name: is the cra_name / name or cra_driver_name / driver name of the
718 * ablkcipher cipher
719 * @type: specifies the type of the cipher
720 * @mask: specifies the mask for the cipher
721 *
722 * Allocate a cipher handle for an ablkcipher. The returned struct
723 * crypto_ablkcipher is the cipher handle that is required for any subsequent
724 * API invocation for that ablkcipher.
725 *
726 * Return: allocated cipher handle in case of success; IS_ERR() is true in case
727 * of an error, PTR_ERR() returns the error code.
728 */
729struct crypto_ablkcipher *crypto_alloc_ablkcipher(const char *alg_name,
730 u32 type, u32 mask);
731
732static inline struct crypto_tfm *crypto_ablkcipher_tfm( 715static inline struct crypto_tfm *crypto_ablkcipher_tfm(
733 struct crypto_ablkcipher *tfm) 716 struct crypto_ablkcipher *tfm)
734{ 717{
diff --git a/include/linux/mpi.h b/include/linux/mpi.h
index 3a5abe95affd..1cc5ffb769af 100644
--- a/include/linux/mpi.h
+++ b/include/linux/mpi.h
@@ -80,8 +80,7 @@ void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign);
80int mpi_read_buffer(MPI a, uint8_t *buf, unsigned buf_len, unsigned *nbytes, 80int mpi_read_buffer(MPI a, uint8_t *buf, unsigned buf_len, unsigned *nbytes,
81 int *sign); 81 int *sign);
82void *mpi_get_secure_buffer(MPI a, unsigned *nbytes, int *sign); 82void *mpi_get_secure_buffer(MPI a, unsigned *nbytes, int *sign);
83int mpi_set_buffer(MPI a, const void *buffer, unsigned nbytes, int sign); 83int mpi_write_to_sgl(MPI a, struct scatterlist *sg, unsigned nbytes,
84int mpi_write_to_sgl(MPI a, struct scatterlist *sg, unsigned *nbytes,
85 int *sign); 84 int *sign);
86 85
87#define log_mpidump g10_log_mpidump 86#define log_mpidump g10_log_mpidump