aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/internal.h')
-rw-r--r--crypto/internal.h27
1 files changed, 6 insertions, 21 deletions
diff --git a/crypto/internal.h b/crypto/internal.h
index 2da6ad4f3593..60acad9788c5 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -83,8 +83,7 @@ static inline void crypto_exit_proc(void)
83{ } 83{ }
84#endif 84#endif
85 85
86static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg, 86static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg)
87 int flags)
88{ 87{
89 unsigned int len = alg->cra_ctxsize; 88 unsigned int len = alg->cra_ctxsize;
90 89
@@ -96,23 +95,12 @@ static inline unsigned int crypto_digest_ctxsize(struct crypto_alg *alg,
96 return len; 95 return len;
97} 96}
98 97
99static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg, 98static inline unsigned int crypto_cipher_ctxsize(struct crypto_alg *alg)
100 int flags)
101{ 99{
102 unsigned int len = alg->cra_ctxsize; 100 return alg->cra_ctxsize;
103
104 switch (flags & CRYPTO_TFM_MODE_MASK) {
105 case CRYPTO_TFM_MODE_CBC:
106 len = ALIGN(len, (unsigned long)alg->cra_alignmask + 1);
107 len += alg->cra_blocksize;
108 break;
109 }
110
111 return len;
112} 101}
113 102
114static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg, 103static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg)
115 int flags)
116{ 104{
117 return alg->cra_ctxsize; 105 return alg->cra_ctxsize;
118} 106}
@@ -121,10 +109,6 @@ struct crypto_alg *crypto_mod_get(struct crypto_alg *alg);
121struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask); 109struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask);
122struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask); 110struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask);
123 111
124int crypto_init_digest_flags(struct crypto_tfm *tfm, u32 flags);
125int crypto_init_cipher_flags(struct crypto_tfm *tfm, u32 flags);
126int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags);
127
128int crypto_init_digest_ops(struct crypto_tfm *tfm); 112int crypto_init_digest_ops(struct crypto_tfm *tfm);
129int crypto_init_cipher_ops(struct crypto_tfm *tfm); 113int crypto_init_cipher_ops(struct crypto_tfm *tfm);
130int crypto_init_compress_ops(struct crypto_tfm *tfm); 114int crypto_init_compress_ops(struct crypto_tfm *tfm);
@@ -136,7 +120,8 @@ void crypto_exit_compress_ops(struct crypto_tfm *tfm);
136void crypto_larval_error(const char *name, u32 type, u32 mask); 120void crypto_larval_error(const char *name, u32 type, u32 mask);
137 121
138void crypto_shoot_alg(struct crypto_alg *alg); 122void crypto_shoot_alg(struct crypto_alg *alg);
139struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 flags); 123struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 type,
124 u32 mask);
140 125
141int crypto_register_instance(struct crypto_template *tmpl, 126int crypto_register_instance(struct crypto_template *tmpl,
142 struct crypto_instance *inst); 127 struct crypto_instance *inst);