This source file includes following definitions.
- to_cipher_tmpl
1
2
3
4
5
6 #ifndef _CIPHER_H_
7 #define _CIPHER_H_
8
9 #include "common.h"
10 #include "core.h"
11
12 #define QCE_MAX_KEY_SIZE 64
13
14 struct qce_cipher_ctx {
15 u8 enc_key[QCE_MAX_KEY_SIZE];
16 unsigned int enc_keylen;
17 struct crypto_sync_skcipher *fallback;
18 };
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 struct qce_cipher_reqctx {
35 unsigned long flags;
36 u8 *iv;
37 unsigned int ivsize;
38 int src_nents;
39 int dst_nents;
40 struct scatterlist result_sg;
41 struct sg_table dst_tbl;
42 struct scatterlist *dst_sg;
43 struct sg_table src_tbl;
44 struct scatterlist *src_sg;
45 unsigned int cryptlen;
46 };
47
48 static inline struct qce_alg_template *to_cipher_tmpl(struct crypto_tfm *tfm)
49 {
50 struct crypto_alg *alg = tfm->__crt_alg;
51 return container_of(alg, struct qce_alg_template, alg.crypto);
52 }
53
54 extern const struct qce_algo_ops ablkcipher_ops;
55
56 #endif