summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2022-11-11 18:05:41 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2022-11-18 16:59:34 +0800
commite6cb02bd0a52457e486a752da5db7b67f2540c16 (patch)
tree08a8263c76c3d9f2008daf6992b013f76e1738fd /include/crypto
parentcc7710d0d4ebc6998f04035cde4f32c5ddbe9d7f (diff)
downloadlinux-stable-e6cb02bd0a52457e486a752da5db7b67f2540c16.tar.gz
linux-stable-e6cb02bd0a52457e486a752da5db7b67f2540c16.tar.bz2
linux-stable-e6cb02bd0a52457e486a752da5db7b67f2540c16.zip
crypto: skcipher - Allow sync algorithms with large request contexts
Some sync algorithms may require a large amount of temporary space during its operations. There is no reason why they should be limited just because some legacy users want to place all temporary data on the stack. Such algorithms can now set a flag to indicate that they need extra request context, which will cause them to be invisible to users that go through the sync_skcipher interface. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/internal/skcipher.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/crypto/internal/skcipher.h b/include/crypto/internal/skcipher.h
index a2339f80a615..2a97540156bb 100644
--- a/include/crypto/internal/skcipher.h
+++ b/include/crypto/internal/skcipher.h
@@ -14,6 +14,14 @@
#include <linux/list.h>
#include <linux/types.h>
+/*
+ * Set this if your algorithm is sync but needs a reqsize larger
+ * than MAX_SYNC_SKCIPHER_REQSIZE.
+ *
+ * Reuse bit that is specific to hash algorithms.
+ */
+#define CRYPTO_ALG_SKCIPHER_REQSIZE_LARGE CRYPTO_ALG_OPTIONAL_KEY
+
struct aead_request;
struct rtattr;