Lines Matching full:desc

78 #define SHA384_CTX(desc) ((struct sha384_ctx *)shash_desc_ctx(desc))  argument
80 static int crypto_sha384_init(struct shash_desc *desc) in crypto_sha384_init() argument
82 sha384_init(SHA384_CTX(desc)); in crypto_sha384_init()
86 static int crypto_sha384_update(struct shash_desc *desc, in crypto_sha384_update() argument
89 sha384_update(SHA384_CTX(desc), data, len); in crypto_sha384_update()
93 static int crypto_sha384_final(struct shash_desc *desc, u8 *out) in crypto_sha384_final() argument
95 sha384_final(SHA384_CTX(desc), out); in crypto_sha384_final()
99 static int crypto_sha384_digest(struct shash_desc *desc, in crypto_sha384_digest() argument
106 static int crypto_sha384_export(struct shash_desc *desc, void *out) in crypto_sha384_export() argument
108 return __crypto_sha512_export(&SHA384_CTX(desc)->ctx, out); in crypto_sha384_export()
111 static int crypto_sha384_import(struct shash_desc *desc, const void *in) in crypto_sha384_import() argument
113 return __crypto_sha512_import(&SHA384_CTX(desc)->ctx, in); in crypto_sha384_import()
116 static int crypto_sha384_export_core(struct shash_desc *desc, void *out) in crypto_sha384_export_core() argument
118 return __crypto_sha512_export_core(&SHA384_CTX(desc)->ctx, out); in crypto_sha384_export_core()
121 static int crypto_sha384_import_core(struct shash_desc *desc, const void *in) in crypto_sha384_import_core() argument
123 return __crypto_sha512_import_core(&SHA384_CTX(desc)->ctx, in); in crypto_sha384_import_core()
140 #define SHA512_CTX(desc) ((struct sha512_ctx *)shash_desc_ctx(desc)) argument
142 static int crypto_sha512_init(struct shash_desc *desc) in crypto_sha512_init() argument
144 sha512_init(SHA512_CTX(desc)); in crypto_sha512_init()
148 static int crypto_sha512_update(struct shash_desc *desc, in crypto_sha512_update() argument
151 sha512_update(SHA512_CTX(desc), data, len); in crypto_sha512_update()
155 static int crypto_sha512_final(struct shash_desc *desc, u8 *out) in crypto_sha512_final() argument
157 sha512_final(SHA512_CTX(desc), out); in crypto_sha512_final()
161 static int crypto_sha512_digest(struct shash_desc *desc, in crypto_sha512_digest() argument
168 static int crypto_sha512_export(struct shash_desc *desc, void *out) in crypto_sha512_export() argument
170 return __crypto_sha512_export(&SHA512_CTX(desc)->ctx, out); in crypto_sha512_export()
173 static int crypto_sha512_import(struct shash_desc *desc, const void *in) in crypto_sha512_import() argument
175 return __crypto_sha512_import(&SHA512_CTX(desc)->ctx, in); in crypto_sha512_import()
178 static int crypto_sha512_export_core(struct shash_desc *desc, void *out) in crypto_sha512_export_core() argument
180 return __crypto_sha512_export_core(&SHA512_CTX(desc)->ctx, out); in crypto_sha512_export_core()
183 static int crypto_sha512_import_core(struct shash_desc *desc, const void *in) in crypto_sha512_import_core() argument
185 return __crypto_sha512_import_core(&SHA512_CTX(desc)->ctx, in); in crypto_sha512_import_core()
191 #define HMAC_SHA384_CTX(desc) ((struct hmac_sha384_ctx *)shash_desc_ctx(desc)) argument
200 static int crypto_hmac_sha384_init(struct shash_desc *desc) in crypto_hmac_sha384_init() argument
202 hmac_sha384_init(HMAC_SHA384_CTX(desc), HMAC_SHA384_KEY(desc->tfm)); in crypto_hmac_sha384_init()
206 static int crypto_hmac_sha384_update(struct shash_desc *desc, in crypto_hmac_sha384_update() argument
209 hmac_sha384_update(HMAC_SHA384_CTX(desc), data, len); in crypto_hmac_sha384_update()
213 static int crypto_hmac_sha384_final(struct shash_desc *desc, u8 *out) in crypto_hmac_sha384_final() argument
215 hmac_sha384_final(HMAC_SHA384_CTX(desc), out); in crypto_hmac_sha384_final()
219 static int crypto_hmac_sha384_digest(struct shash_desc *desc, in crypto_hmac_sha384_digest() argument
223 hmac_sha384(HMAC_SHA384_KEY(desc->tfm), data, len, out); in crypto_hmac_sha384_digest()
227 static int crypto_hmac_sha384_export(struct shash_desc *desc, void *out) in crypto_hmac_sha384_export() argument
229 return __crypto_sha512_export(&HMAC_SHA384_CTX(desc)->ctx.sha_ctx, out); in crypto_hmac_sha384_export()
232 static int crypto_hmac_sha384_import(struct shash_desc *desc, const void *in) in crypto_hmac_sha384_import() argument
234 struct hmac_sha384_ctx *ctx = HMAC_SHA384_CTX(desc); in crypto_hmac_sha384_import()
236 ctx->ctx.ostate = HMAC_SHA384_KEY(desc->tfm)->key.ostate; in crypto_hmac_sha384_import()
240 static int crypto_hmac_sha384_export_core(struct shash_desc *desc, void *out) in crypto_hmac_sha384_export_core() argument
242 return __crypto_sha512_export_core(&HMAC_SHA384_CTX(desc)->ctx.sha_ctx, in crypto_hmac_sha384_export_core()
246 static int crypto_hmac_sha384_import_core(struct shash_desc *desc, in crypto_hmac_sha384_import_core() argument
249 struct hmac_sha384_ctx *ctx = HMAC_SHA384_CTX(desc); in crypto_hmac_sha384_import_core()
251 ctx->ctx.ostate = HMAC_SHA384_KEY(desc->tfm)->key.ostate; in crypto_hmac_sha384_import_core()
258 #define HMAC_SHA512_CTX(desc) ((struct hmac_sha512_ctx *)shash_desc_ctx(desc)) argument
267 static int crypto_hmac_sha512_init(struct shash_desc *desc) in crypto_hmac_sha512_init() argument
269 hmac_sha512_init(HMAC_SHA512_CTX(desc), HMAC_SHA512_KEY(desc->tfm)); in crypto_hmac_sha512_init()
273 static int crypto_hmac_sha512_update(struct shash_desc *desc, in crypto_hmac_sha512_update() argument
276 hmac_sha512_update(HMAC_SHA512_CTX(desc), data, len); in crypto_hmac_sha512_update()
280 static int crypto_hmac_sha512_final(struct shash_desc *desc, u8 *out) in crypto_hmac_sha512_final() argument
282 hmac_sha512_final(HMAC_SHA512_CTX(desc), out); in crypto_hmac_sha512_final()
286 static int crypto_hmac_sha512_digest(struct shash_desc *desc, in crypto_hmac_sha512_digest() argument
290 hmac_sha512(HMAC_SHA512_KEY(desc->tfm), data, len, out); in crypto_hmac_sha512_digest()
294 static int crypto_hmac_sha512_export(struct shash_desc *desc, void *out) in crypto_hmac_sha512_export() argument
296 return __crypto_sha512_export(&HMAC_SHA512_CTX(desc)->ctx.sha_ctx, out); in crypto_hmac_sha512_export()
299 static int crypto_hmac_sha512_import(struct shash_desc *desc, const void *in) in crypto_hmac_sha512_import() argument
301 struct hmac_sha512_ctx *ctx = HMAC_SHA512_CTX(desc); in crypto_hmac_sha512_import()
303 ctx->ctx.ostate = HMAC_SHA512_KEY(desc->tfm)->key.ostate; in crypto_hmac_sha512_import()
307 static int crypto_hmac_sha512_export_core(struct shash_desc *desc, void *out) in crypto_hmac_sha512_export_core() argument
309 return __crypto_sha512_export_core(&HMAC_SHA512_CTX(desc)->ctx.sha_ctx, in crypto_hmac_sha512_export_core()
313 static int crypto_hmac_sha512_import_core(struct shash_desc *desc, in crypto_hmac_sha512_import_core() argument
316 struct hmac_sha512_ctx *ctx = HMAC_SHA512_CTX(desc); in crypto_hmac_sha512_import_core()
318 ctx->ctx.ostate = HMAC_SHA512_KEY(desc->tfm)->key.ostate; in crypto_hmac_sha512_import_core()