aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2016-11-22 07:08:23 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2016-11-28 08:23:18 -0500
commit4e0958d19bd86ee8121cf044eac4395c7e504fb3 (patch)
treefc3f41453d1ff48595bce0bb24ebb78551aa9fed /include/crypto
parent430b441cdcdeb7c3eff4c208effb970f41867934 (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.h13
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
20struct cryptd_ablkcipher { 20struct 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);
34bool cryptd_ablkcipher_queued(struct cryptd_ablkcipher *tfm); 34bool cryptd_ablkcipher_queued(struct cryptd_ablkcipher *tfm);
35void cryptd_free_ablkcipher(struct cryptd_ablkcipher *tfm); 35void cryptd_free_ablkcipher(struct cryptd_ablkcipher *tfm);
36 36
37struct cryptd_skcipher {
38 struct crypto_skcipher base;
39};
40
41struct cryptd_skcipher *cryptd_alloc_skcipher(const char *alg_name,
42 u32 type, u32 mask);
43struct crypto_skcipher *cryptd_skcipher_child(struct cryptd_skcipher *tfm);
44/* Must be called without moving CPUs. */
45bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm);
46void cryptd_free_skcipher(struct cryptd_skcipher *tfm);
47
37struct cryptd_ahash { 48struct cryptd_ahash {
38 struct crypto_ahash base; 49 struct crypto_ahash base;
39}; 50};