1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Software async crypto daemon 4 * 5 * Added AEAD support to cryptd. 6 * Authors: Tadeusz Struk (tadeusz.struk@intel.com) 7 * Adrian Hoban <adrian.hoban@intel.com> 8 * Gabriele Paoloni <gabriele.paoloni@intel.com> 9 * Aidan O'Mahony (aidan.o.mahony@intel.com) 10 * Copyright (c) 2010, Intel Corporation. 11 */ 12 13 #ifndef _CRYPTO_CRYPT_H 14 #define _CRYPTO_CRYPT_H 15 16 #include <linux/types.h> 17 18 #include <crypto/aead.h> 19 20 struct cryptd_aead { 21 struct crypto_aead base; 22 }; 23 24 static inline struct cryptd_aead *__cryptd_aead_cast( 25 struct crypto_aead *tfm) 26 { 27 return (struct cryptd_aead *)tfm; 28 } 29 30 struct cryptd_aead *cryptd_alloc_aead(const char *alg_name, 31 u32 type, u32 mask); 32 33 struct crypto_aead *cryptd_aead_child(struct cryptd_aead *tfm); 34 /* Must be called without moving CPUs. */ 35 bool cryptd_aead_queued(struct cryptd_aead *tfm); 36 37 void cryptd_free_aead(struct cryptd_aead *tfm); 38 39 #endif 40