summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2023-05-19 16:28:35 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2023-05-24 18:12:33 +0800
commit51d8d6d0f4bedb6a4e9afb20857bb592424de144 (patch)
treeb419114f9f46758e6c27b9d39cfa68ab2550fe0c /include/crypto
parentcf2eddc931ab6e4dd96d38bd75ef8aac3422a8f4 (diff)
downloadlinux-51d8d6d0f4bedb6a4e9afb20857bb592424de144.tar.gz
linux-51d8d6d0f4bedb6a4e9afb20857bb592424de144.tar.bz2
linux-51d8d6d0f4bedb6a4e9afb20857bb592424de144.zip
crypto: cipher - Add crypto_clone_cipher
Allow simple ciphers to be cloned, if they don't have a cra_init function. This basically rules out those ciphers that require a fallback. In future simple ciphers will be eliminated, and replaced with a linear skcipher interface. When that happens this restriction will disappear. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/internal/cipher.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/internal/cipher.h b/include/crypto/internal/cipher.h
index a9174ba90250..5030f6d2df31 100644
--- a/include/crypto/internal/cipher.h
+++ b/include/crypto/internal/cipher.h
@@ -176,6 +176,8 @@ void crypto_cipher_encrypt_one(struct crypto_cipher *tfm,
void crypto_cipher_decrypt_one(struct crypto_cipher *tfm,
u8 *dst, const u8 *src);
+struct crypto_cipher *crypto_clone_cipher(struct crypto_cipher *cipher);
+
struct crypto_cipher_spawn {
struct crypto_spawn base;
};