diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/crypto.h | 31 | ||||
| -rw-r--r-- | include/linux/mpi.h | 3 |
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 | */ | ||
| 729 | struct crypto_ablkcipher *crypto_alloc_ablkcipher(const char *alg_name, | ||
| 730 | u32 type, u32 mask); | ||
| 731 | |||
| 732 | static inline struct crypto_tfm *crypto_ablkcipher_tfm( | 715 | static 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); | |||
| 80 | int mpi_read_buffer(MPI a, uint8_t *buf, unsigned buf_len, unsigned *nbytes, | 80 | int mpi_read_buffer(MPI a, uint8_t *buf, unsigned buf_len, unsigned *nbytes, |
| 81 | int *sign); | 81 | int *sign); |
| 82 | void *mpi_get_secure_buffer(MPI a, unsigned *nbytes, int *sign); | 82 | void *mpi_get_secure_buffer(MPI a, unsigned *nbytes, int *sign); |
| 83 | int mpi_set_buffer(MPI a, const void *buffer, unsigned nbytes, int sign); | 83 | int mpi_write_to_sgl(MPI a, struct scatterlist *sg, unsigned nbytes, |
| 84 | int 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 |
