diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 12:28:16 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 12:28:16 -0400 |
| commit | 59ecc26004e77e100c700b1d0da7502b0fdadb46 (patch) | |
| tree | 1faec47bda8439cc2cbe3bd9bf15756e67808e63 /include | |
| parent | bea803183e12a1c78a12ec70907174d13d958333 (diff) | |
| parent | 8ceee72808d1ae3fb191284afc2257a2be964725 (diff) | |
Merge 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 3.15:
- Added 3DES driver for OMAP4/AM43xx
- Added AVX2 acceleration for SHA
- Added hash-only AEAD algorithms in caam
- Removed tegra driver as it is not functioning and the hardware is
too slow
- Allow blkcipher walks over AEAD (needed for ARM)
- Fixed unprotected FPU/SSE access in ghash-clmulni-intel
- Fixed highmem crash in omap-sham
- Add (zero entropy) randomness when initialising hardware RNGs
- Fixed unaligned ahash comletion functions
- Added soft module depedency for crc32c for initrds that use crc32c"
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (60 commits)
crypto: ghash-clmulni-intel - use C implementation for setkey()
crypto: x86/sha1 - reduce size of the AVX2 asm implementation
crypto: x86/sha1 - fix stack alignment of AVX2 variant
crypto: x86/sha1 - re-enable the AVX variant
crypto: sha - SHA1 transform x86_64 AVX2
crypto: crypto_wq - Fix late crypto work queue initialization
crypto: caam - add missing key_dma unmap
crypto: caam - add support for aead null encryption
crypto: testmgr - add aead null encryption test vectors
crypto: export NULL algorithms defines
crypto: caam - remove error propagation handling
crypto: hash - Simplify the ahash_finup implementation
crypto: hash - Pull out the functions to save/restore request
crypto: hash - Fix the pointer voodoo in unaligned ahash
crypto: caam - Fix first parameter to caam_init_rng
crypto: omap-sham - Map SG pages if they are HIGHMEM before accessing
crypto: caam - Dynamic memory allocation for caam_rng_ctx object
crypto: allow blkcipher walks over AEAD data
crypto: remove direct blkcipher_walk dependency on transform
hwrng: add randomness to system from rng sources
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/crypto/algapi.h | 9 | ||||
| -rw-r--r-- | include/crypto/null.h | 11 | ||||
| -rw-r--r-- | include/linux/ccp.h | 7 |
3 files changed, 26 insertions, 1 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index e73c19e90e38..016c2f110f63 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h | |||
| @@ -100,9 +100,12 @@ struct blkcipher_walk { | |||
| 100 | void *page; | 100 | void *page; |
| 101 | u8 *buffer; | 101 | u8 *buffer; |
| 102 | u8 *iv; | 102 | u8 *iv; |
| 103 | unsigned int ivsize; | ||
| 103 | 104 | ||
| 104 | int flags; | 105 | int flags; |
| 105 | unsigned int blocksize; | 106 | unsigned int walk_blocksize; |
| 107 | unsigned int cipher_blocksize; | ||
| 108 | unsigned int alignmask; | ||
| 106 | }; | 109 | }; |
| 107 | 110 | ||
| 108 | struct ablkcipher_walk { | 111 | struct ablkcipher_walk { |
| @@ -192,6 +195,10 @@ int blkcipher_walk_phys(struct blkcipher_desc *desc, | |||
| 192 | int blkcipher_walk_virt_block(struct blkcipher_desc *desc, | 195 | int blkcipher_walk_virt_block(struct blkcipher_desc *desc, |
| 193 | struct blkcipher_walk *walk, | 196 | struct blkcipher_walk *walk, |
| 194 | unsigned int blocksize); | 197 | unsigned int blocksize); |
| 198 | int blkcipher_aead_walk_virt_block(struct blkcipher_desc *desc, | ||
| 199 | struct blkcipher_walk *walk, | ||
| 200 | struct crypto_aead *tfm, | ||
| 201 | unsigned int blocksize); | ||
| 195 | 202 | ||
| 196 | int ablkcipher_walk_done(struct ablkcipher_request *req, | 203 | int ablkcipher_walk_done(struct ablkcipher_request *req, |
| 197 | struct ablkcipher_walk *walk, int err); | 204 | struct ablkcipher_walk *walk, int err); |
diff --git a/include/crypto/null.h b/include/crypto/null.h new file mode 100644 index 000000000000..b7c864cc70df --- /dev/null +++ b/include/crypto/null.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | /* Values for NULL algorithms */ | ||
| 2 | |||
| 3 | #ifndef _CRYPTO_NULL_H | ||
| 4 | #define _CRYPTO_NULL_H | ||
| 5 | |||
| 6 | #define NULL_KEY_SIZE 0 | ||
| 7 | #define NULL_BLOCK_SIZE 1 | ||
| 8 | #define NULL_DIGEST_SIZE 0 | ||
| 9 | #define NULL_IV_SIZE 0 | ||
| 10 | |||
| 11 | #endif | ||
diff --git a/include/linux/ccp.h b/include/linux/ccp.h index b941ab9f762b..ebcc9d146219 100644 --- a/include/linux/ccp.h +++ b/include/linux/ccp.h | |||
| @@ -232,6 +232,9 @@ enum ccp_sha_type { | |||
| 232 | * @ctx_len: length in bytes of hash value | 232 | * @ctx_len: length in bytes of hash value |
| 233 | * @src: data to be used for this operation | 233 | * @src: data to be used for this operation |
| 234 | * @src_len: length in bytes of data used for this operation | 234 | * @src_len: length in bytes of data used for this operation |
| 235 | * @opad: data to be used for final HMAC operation | ||
| 236 | * @opad_len: length in bytes of data used for final HMAC operation | ||
| 237 | * @first: indicates first SHA operation | ||
| 235 | * @final: indicates final SHA operation | 238 | * @final: indicates final SHA operation |
| 236 | * @msg_bits: total length of the message in bits used in final SHA operation | 239 | * @msg_bits: total length of the message in bits used in final SHA operation |
| 237 | * | 240 | * |
| @@ -251,6 +254,10 @@ struct ccp_sha_engine { | |||
| 251 | struct scatterlist *src; | 254 | struct scatterlist *src; |
| 252 | u64 src_len; /* In bytes */ | 255 | u64 src_len; /* In bytes */ |
| 253 | 256 | ||
| 257 | struct scatterlist *opad; | ||
| 258 | u32 opad_len; /* In bytes */ | ||
| 259 | |||
| 260 | u32 first; /* Indicates first sha cmd */ | ||
| 254 | u32 final; /* Indicates final sha cmd */ | 261 | u32 final; /* Indicates final sha cmd */ |
| 255 | u64 msg_bits; /* Message length in bits required for | 262 | u64 msg_bits; /* Message length in bits required for |
| 256 | * final sha cmd */ | 263 | * final sha cmd */ |
