xref: /linux/crypto/skcipher.h (revision 4999999ed7e099fcc2476c8b3a245c4c2c9026c0)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Cryptographic API.
4  *
5  * Copyright (c) 2023 Herbert Xu <herbert@gondor.apana.org.au>
6  */
7 #ifndef _LOCAL_CRYPTO_SKCIPHER_H
8 #define _LOCAL_CRYPTO_SKCIPHER_H
9 
10 #include <crypto/internal/skcipher.h>
11 #include "internal.h"
12 
13 static inline struct crypto_istat_cipher *skcipher_get_stat_common(
14 	struct skcipher_alg_common *alg)
15 {
16 #ifdef CONFIG_CRYPTO_STATS
17 	return &alg->stat;
18 #else
19 	return NULL;
20 #endif
21 }
22 
23 int crypto_lskcipher_setkey_sg(struct crypto_skcipher *tfm, const u8 *key,
24 			       unsigned int keylen);
25 int crypto_lskcipher_encrypt_sg(struct skcipher_request *req);
26 int crypto_lskcipher_decrypt_sg(struct skcipher_request *req);
27 int crypto_init_lskcipher_ops_sg(struct crypto_tfm *tfm);
28 int skcipher_prepare_alg_common(struct skcipher_alg_common *alg);
29 
30 #endif	/* _LOCAL_CRYPTO_SKCIPHER_H */
31