.. | .. |
---|
11 | 11 | #include <asm/fpu/api.h> |
---|
12 | 12 | #include <crypto/b128ops.h> |
---|
13 | 13 | |
---|
14 | | -typedef void (*common_glue_func_t)(void *ctx, u8 *dst, const u8 *src); |
---|
15 | | -typedef void (*common_glue_cbc_func_t)(void *ctx, u128 *dst, const u128 *src); |
---|
16 | | -typedef void (*common_glue_ctr_func_t)(void *ctx, u128 *dst, const u128 *src, |
---|
| 14 | +typedef void (*common_glue_func_t)(const void *ctx, u8 *dst, const u8 *src); |
---|
| 15 | +typedef void (*common_glue_cbc_func_t)(const void *ctx, u8 *dst, const u8 *src); |
---|
| 16 | +typedef void (*common_glue_ctr_func_t)(const void *ctx, u8 *dst, const u8 *src, |
---|
17 | 17 | le128 *iv); |
---|
18 | | -typedef void (*common_glue_xts_func_t)(void *ctx, u128 *dst, const u128 *src, |
---|
| 18 | +typedef void (*common_glue_xts_func_t)(const void *ctx, u8 *dst, const u8 *src, |
---|
19 | 19 | le128 *iv); |
---|
20 | | - |
---|
21 | | -#define GLUE_FUNC_CAST(fn) ((common_glue_func_t)(fn)) |
---|
22 | | -#define GLUE_CBC_FUNC_CAST(fn) ((common_glue_cbc_func_t)(fn)) |
---|
23 | | -#define GLUE_CTR_FUNC_CAST(fn) ((common_glue_ctr_func_t)(fn)) |
---|
24 | | -#define GLUE_XTS_FUNC_CAST(fn) ((common_glue_xts_func_t)(fn)) |
---|
25 | 20 | |
---|
26 | 21 | struct common_glue_func_entry { |
---|
27 | 22 | unsigned int num_blocks; /* number of blocks that @fn will process */ |
---|
.. | .. |
---|
114 | 109 | extern int glue_xts_req_128bit(const struct common_glue_ctx *gctx, |
---|
115 | 110 | struct skcipher_request *req, |
---|
116 | 111 | common_glue_func_t tweak_fn, void *tweak_ctx, |
---|
117 | | - void *crypt_ctx); |
---|
| 112 | + void *crypt_ctx, bool decrypt); |
---|
118 | 113 | |
---|
119 | | -extern void glue_xts_crypt_128bit_one(void *ctx, u128 *dst, const u128 *src, |
---|
120 | | - le128 *iv, common_glue_func_t fn); |
---|
| 114 | +extern void glue_xts_crypt_128bit_one(const void *ctx, u8 *dst, |
---|
| 115 | + const u8 *src, le128 *iv, |
---|
| 116 | + common_glue_func_t fn); |
---|
121 | 117 | |
---|
122 | 118 | #endif /* _CRYPTO_GLUE_HELPER_H */ |
---|