ablk_helper.h 773 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Shared async block cipher helpers
  4. */
  5. #ifndef _CRYPTO_ABLK_HELPER_H
  6. #define _CRYPTO_ABLK_HELPER_H
  7. #include <linux/crypto.h>
  8. #include <linux/kernel.h>
  9. #include <crypto/cryptd.h>
  10. struct async_helper_ctx {
  11. struct cryptd_ablkcipher *cryptd_tfm;
  12. };
  13. extern int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key,
  14. unsigned int key_len);
  15. extern int __ablk_encrypt(struct ablkcipher_request *req);
  16. extern int ablk_encrypt(struct ablkcipher_request *req);
  17. extern int ablk_decrypt(struct ablkcipher_request *req);
  18. extern void ablk_exit(struct crypto_tfm *tfm);
  19. extern int ablk_init_common(struct crypto_tfm *tfm, const char *drv_name);
  20. extern int ablk_init(struct crypto_tfm *tfm);
  21. #endif /* _CRYPTO_ABLK_HELPER_H */