diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-11-22 07:08:23 -0500 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-11-28 08:23:18 -0500 |
| commit | 4e0958d19bd86ee8121cf044eac4395c7e504fb3 (patch) | |
| tree | fc3f41453d1ff48595bce0bb24ebb78551aa9fed /include/crypto | |
| parent | 430b441cdcdeb7c3eff4c208effb970f41867934 (diff) | |
crypto: cryptd - Add support for skcipher
This patch adds skcipher support to cryptd alongside ablkcipher.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
| -rw-r--r-- | include/crypto/cryptd.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/crypto/cryptd.h b/include/crypto/cryptd.h index bc792d5a9e88..94418cbf9013 100644 --- a/include/crypto/cryptd.h +++ b/include/crypto/cryptd.h | |||
| @@ -12,10 +12,10 @@ | |||
| 12 | #ifndef _CRYPTO_CRYPT_H | 12 | #ifndef _CRYPTO_CRYPT_H |
| 13 | #define _CRYPTO_CRYPT_H | 13 | #define _CRYPTO_CRYPT_H |
| 14 | 14 | ||
| 15 | #include <linux/crypto.h> | ||
| 16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
| 17 | #include <crypto/aead.h> | 16 | #include <crypto/aead.h> |
| 18 | #include <crypto/hash.h> | 17 | #include <crypto/hash.h> |
| 18 | #include <crypto/skcipher.h> | ||
| 19 | 19 | ||
| 20 | struct cryptd_ablkcipher { | 20 | struct cryptd_ablkcipher { |
| 21 | struct crypto_ablkcipher base; | 21 | struct crypto_ablkcipher base; |
| @@ -34,6 +34,17 @@ struct crypto_blkcipher *cryptd_ablkcipher_child(struct cryptd_ablkcipher *tfm); | |||
| 34 | bool cryptd_ablkcipher_queued(struct cryptd_ablkcipher *tfm); | 34 | bool cryptd_ablkcipher_queued(struct cryptd_ablkcipher *tfm); |
| 35 | void cryptd_free_ablkcipher(struct cryptd_ablkcipher *tfm); | 35 | void cryptd_free_ablkcipher(struct cryptd_ablkcipher *tfm); |
| 36 | 36 | ||
| 37 | struct cryptd_skcipher { | ||
| 38 | struct crypto_skcipher base; | ||
| 39 | }; | ||
| 40 | |||
| 41 | struct cryptd_skcipher *cryptd_alloc_skcipher(const char *alg_name, | ||
| 42 | u32 type, u32 mask); | ||
| 43 | struct crypto_skcipher *cryptd_skcipher_child(struct cryptd_skcipher *tfm); | ||
| 44 | /* Must be called without moving CPUs. */ | ||
| 45 | bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm); | ||
| 46 | void cryptd_free_skcipher(struct cryptd_skcipher *tfm); | ||
| 47 | |||
| 37 | struct cryptd_ahash { | 48 | struct cryptd_ahash { |
| 38 | struct crypto_ahash base; | 49 | struct crypto_ahash base; |
| 39 | }; | 50 | }; |
