@@ -1423,6 +1423,9 @@ config CRYPTO_HASH_INFO
config CRYPTO_PUB_KEY_INFO
bool
+config CRYPTO_SIG_ENC_INFO
+ bool
+
if !KMSAN # avoid false positives from assembly
if ARM
source "arch/arm/crypto/Kconfig"
@@ -207,6 +207,7 @@ obj-$(CONFIG_ASYNC_CORE) += async_tx/
obj-$(CONFIG_ASYMMETRIC_KEY_TYPE) += asymmetric_keys/
obj-$(CONFIG_CRYPTO_HASH_INFO) += hash_info.o
obj-$(CONFIG_CRYPTO_PUB_KEY_INFO) += pub_key_info.o
+obj-$(CONFIG_CRYPTO_SIG_ENC_INFO) += sig_enc_info.o
crypto_simd-y := simd.o
obj-$(CONFIG_CRYPTO_SIMD) += crypto_simd.o
new file mode 100644
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2023 Huawei Technologies Duesseldorf GmbH
+ *
+ * Sig enc info: Signature encoding information
+ */
+
+#include <linux/export.h>
+#include <crypto/sig_enc_info.h>
+
+const char *const sig_enc_name[SIG_ENC__LAST] = {
+ [SIG_ENC_PKCS1] = "pkcs1",
+ [SIG_ENC_X962] = "x962",
+ [SIG_ENC_RAW] = "raw",
+};
+EXPORT_SYMBOL_GPL(sig_enc_name);
new file mode 100644
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * Copyright (C) 2023 Huawei Technologies Duesseldorf GmbH
+ *
+ * Sig enc info: Signature encoding information
+ */
+
+#ifndef _CRYPTO_SIG_ENC_INFO_H
+#define _CRYPTO_SIG_ENC_INFO_H
+
+#include <uapi/linux/sig_enc_info.h>
+
+extern const char *const sig_enc_name[SIG_ENC__LAST];
+
+#endif /* _CRYPTO_SIG_ENC_INFO_H */
new file mode 100644
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+/*
+ * Copyright (C) 2023 Huawei Technologies Duesseldorf GmbH
+ *
+ * Sig enc info: Signature encoding information
+ */
+
+#ifndef _UAPI_LINUX_SIG_ENC_INFO_H
+#define _UAPI_LINUX_SIG_ENC_INFO_H
+
+enum sig_enc_info {
+ SIG_ENC_PKCS1,
+ SIG_ENC_X962,
+ SIG_ENC_RAW,
+ SIG_ENC__LAST,
+};
+
+#endif /* _UAPI_LINUX_SIG_ENC_INFO_H */