0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef _CRYPTO_CRYPT_H
0014 #define _CRYPTO_CRYPT_H
0015
0016 #include <linux/types.h>
0017
0018 #include <crypto/aead.h>
0019 #include <crypto/hash.h>
0020 #include <crypto/skcipher.h>
0021
0022 struct cryptd_skcipher {
0023 struct crypto_skcipher base;
0024 };
0025
0026
0027 struct cryptd_skcipher *cryptd_alloc_skcipher(const char *alg_name,
0028 u32 type, u32 mask);
0029 struct crypto_skcipher *cryptd_skcipher_child(struct cryptd_skcipher *tfm);
0030
0031 bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm);
0032 void cryptd_free_skcipher(struct cryptd_skcipher *tfm);
0033
0034 struct cryptd_ahash {
0035 struct crypto_ahash base;
0036 };
0037
0038 static inline struct cryptd_ahash *__cryptd_ahash_cast(
0039 struct crypto_ahash *tfm)
0040 {
0041 return (struct cryptd_ahash *)tfm;
0042 }
0043
0044
0045 struct cryptd_ahash *cryptd_alloc_ahash(const char *alg_name,
0046 u32 type, u32 mask);
0047 struct crypto_shash *cryptd_ahash_child(struct cryptd_ahash *tfm);
0048 struct shash_desc *cryptd_shash_desc(struct ahash_request *req);
0049
0050 bool cryptd_ahash_queued(struct cryptd_ahash *tfm);
0051 void cryptd_free_ahash(struct cryptd_ahash *tfm);
0052
0053 struct cryptd_aead {
0054 struct crypto_aead base;
0055 };
0056
0057 static inline struct cryptd_aead *__cryptd_aead_cast(
0058 struct crypto_aead *tfm)
0059 {
0060 return (struct cryptd_aead *)tfm;
0061 }
0062
0063 struct cryptd_aead *cryptd_alloc_aead(const char *alg_name,
0064 u32 type, u32 mask);
0065
0066 struct crypto_aead *cryptd_aead_child(struct cryptd_aead *tfm);
0067
0068 bool cryptd_aead_queued(struct cryptd_aead *tfm);
0069
0070 void cryptd_free_aead(struct cryptd_aead *tfm);
0071
0072 #endif