• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _AEAD_API_H
4 #define _AEAD_API_H
5 
6 #include <crypto/aead.h>
7 #include <linux/crypto.h>
8 
9 #define kzfree(x) kfree_sensitive(x)
10 
11 struct crypto_aead *
12 aead_key_setup_encrypt(const char *alg, const u8 key[],
13 		       size_t key_len, size_t mic_len);
14 
15 int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
16 		 size_t aad_len, u8 *data,
17 		 size_t data_len, u8 *mic);
18 
19 int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
20 		 size_t aad_len, u8 *data,
21 		 size_t data_len, u8 *mic);
22 
23 void aead_key_free(struct crypto_aead *tfm);
24 
25 #endif /* _AEAD_API_H */
26