ablk_helper.h 734 B

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