aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto/algapi.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-05-11 05:48:12 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2015-05-12 22:31:53 -0400
commit5d1d65f8bea6de3d9c2c60fdfdd2da02da5ea672 (patch)
tree0ae938f7c50e7a8227f2f93087edf843b44621e5 /include/crypto/algapi.h
parent53033d4d36b0299ef02e28155913414ec1089aac (diff)
crypto: aead - Convert top level interface to new style
This patch converts the top-level aead interface to the new style. All user-level AEAD interface code have been moved into crypto/aead.h. The allocation/free functions have switched over to the new way of allocating tfms. This patch also removes the double indrection on setkey so the indirection now exists only at the alg level. Apart from these there are no user-visible changes. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/algapi.h')
-rw-r--r--include/crypto/algapi.h33
1 files changed, 1 insertions, 32 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index a949bf70983b..d4ebf6e9af6a 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -17,6 +17,7 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/skbuff.h> 18#include <linux/skbuff.h>
19 19
20struct crypto_aead;
20struct module; 21struct module;
21struct rtattr; 22struct rtattr;
22struct seq_file; 23struct seq_file;
@@ -126,7 +127,6 @@ struct ablkcipher_walk {
126}; 127};
127 128
128extern const struct crypto_type crypto_ablkcipher_type; 129extern const struct crypto_type crypto_ablkcipher_type;
129extern const struct crypto_type crypto_aead_type;
130extern const struct crypto_type crypto_blkcipher_type; 130extern const struct crypto_type crypto_blkcipher_type;
131 131
132void crypto_mod_put(struct crypto_alg *alg); 132void crypto_mod_put(struct crypto_alg *alg);
@@ -241,22 +241,6 @@ static inline void *crypto_ablkcipher_ctx_aligned(struct crypto_ablkcipher *tfm)
241 return crypto_tfm_ctx_aligned(&tfm->base); 241 return crypto_tfm_ctx_aligned(&tfm->base);
242} 242}
243 243
244static inline struct aead_alg *crypto_aead_alg(struct crypto_aead *tfm)
245{
246 return &crypto_aead_tfm(tfm)->__crt_alg->cra_aead;
247}
248
249static inline void *crypto_aead_ctx(struct crypto_aead *tfm)
250{
251 return crypto_tfm_ctx(&tfm->base);
252}
253
254static inline struct crypto_instance *crypto_aead_alg_instance(
255 struct crypto_aead *aead)
256{
257 return crypto_tfm_alg_instance(&aead->base);
258}
259
260static inline struct crypto_blkcipher *crypto_spawn_blkcipher( 244static inline struct crypto_blkcipher *crypto_spawn_blkcipher(
261 struct crypto_spawn *spawn) 245 struct crypto_spawn *spawn)
262{ 246{
@@ -365,21 +349,6 @@ static inline int ablkcipher_tfm_in_queue(struct crypto_queue *queue,
365 return crypto_tfm_in_queue(queue, crypto_ablkcipher_tfm(tfm)); 349 return crypto_tfm_in_queue(queue, crypto_ablkcipher_tfm(tfm));
366} 350}
367 351
368static inline void *aead_request_ctx(struct aead_request *req)
369{
370 return req->__ctx;
371}
372
373static inline void aead_request_complete(struct aead_request *req, int err)
374{
375 req->base.complete(&req->base, err);
376}
377
378static inline u32 aead_request_flags(struct aead_request *req)
379{
380 return req->base.flags;
381}
382
383static inline struct crypto_alg *crypto_get_attr_alg(struct rtattr **tb, 352static inline struct crypto_alg *crypto_get_attr_alg(struct rtattr **tb,
384 u32 type, u32 mask) 353 u32 type, u32 mask)
385{ 354{