Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Ard Biesheuvel | a62b01c | 2013-09-20 09:55:40 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Shared async block cipher helpers |
| 4 | */ |
| 5 | |
| 6 | #ifndef _CRYPTO_ABLK_HELPER_H |
| 7 | #define _CRYPTO_ABLK_HELPER_H |
| 8 | |
| 9 | #include <linux/crypto.h> |
| 10 | #include <linux/kernel.h> |
| 11 | #include <crypto/cryptd.h> |
| 12 | |
| 13 | struct async_helper_ctx { |
| 14 | struct cryptd_ablkcipher *cryptd_tfm; |
| 15 | }; |
| 16 | |
| 17 | extern int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key, |
| 18 | unsigned int key_len); |
| 19 | |
| 20 | extern int __ablk_encrypt(struct ablkcipher_request *req); |
| 21 | |
| 22 | extern int ablk_encrypt(struct ablkcipher_request *req); |
| 23 | |
| 24 | extern int ablk_decrypt(struct ablkcipher_request *req); |
| 25 | |
| 26 | extern void ablk_exit(struct crypto_tfm *tfm); |
| 27 | |
| 28 | extern int ablk_init_common(struct crypto_tfm *tfm, const char *drv_name); |
| 29 | |
| 30 | extern int ablk_init(struct crypto_tfm *tfm); |
| 31 | |
| 32 | #endif /* _CRYPTO_ABLK_HELPER_H */ |