@@ -1392,6 +1392,16 @@ config CRYPTO_USER_API_SKCIPHER
See Documentation/crypto/userspace-if.rst and
https://www.chronox.de/libkcapi/html/index.html
+config CRYPTO_USER_API_SKCIPHER_INTERNAL
+ bool "Enable access to internal symmetric key cipher algorithms"
+ depends on CRYPTO_USER_API_SKCIPHER
+ default n
+ help
+ Enable the userspace interface for symmetric key cipher algorithms
+ marked as internal (CRYPTO_ALG_INTERNAL).
+
+ Say N unless you know what you are doing.
+
config CRYPTO_USER_API_RNG
tristate "RNG (random number generator) algorithms"
depends on NET
@@ -342,6 +342,10 @@ static struct proto_ops algif_skcipher_ops_nokey = {
static void *skcipher_bind(const char *name, u32 type, u32 mask)
{
+#ifdef CONFIG_CRYPTO_USER_API_SKCIPHER_INTERNAL
+ type |= CRYPTO_ALG_INTERNAL;
+#endif
+
return crypto_alloc_skcipher(name, type, mask);
}
Add an option to enable the userspace interface for symmetric key cipher algorithms marked as internal (CRYPTO_ALG_INTERNAL). Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz> --- crypto/Kconfig | 10 ++++++++++ crypto/algif_skcipher.c | 4 ++++ 2 files changed, 14 insertions(+)