diff mbox

[v2,3/4] crypto: add CONFIG_ symbol for rsa helper

Message ID 1458745459-1096-4-git-send-email-tudor-dan.ambarus@nxp.com (mailing list archive)
State Changes Requested
Delegated to: Herbert Xu
Headers show

Commit Message

Tudor Ambarus March 23, 2016, 3:04 p.m. UTC
All RSA implementations can now use the key extract symbols
by selecting CRYPTO_RSA_HELPER.

Signed-off-by: Tudor Ambarus <tudor-dan.ambarus@nxp.com>
---
 crypto/Kconfig  | 8 ++++++--
 crypto/Makefile | 6 +++---
 2 files changed, 9 insertions(+), 5 deletions(-)

Comments

Cristian Stoica March 28, 2016, 4:48 p.m. UTC | #1
> -----Original Message-----
> From: linux-crypto-owner@vger.kernel.org [mailto:linux-crypto-
> owner@vger.kernel.org] On Behalf Of Tudor Ambarus
> Sent: Wednesday, March 23, 2016 5:04 PM
> To: herbert@gondor.apana.org.au; tadeusz.struk@intel.com
> Cc: linux-crypto@vger.kernel.org; smueller@chronox.de; Horia Ioan Geanta
> Neag <horia.geanta@nxp.com>; Tudor-Dan Ambarus <tudor-
> dan.ambarus@nxp.com>
> Subject: [PATCH v2 3/4] crypto: add CONFIG_ symbol for rsa helper
> 
> All RSA implementations can now use the key extract symbols by selecting
> CRYPTO_RSA_HELPER.
> 
> Signed-off-by: Tudor Ambarus <tudor-dan.ambarus@nxp.com>

Acked-by: Cristian Stoica <cristian.stoica@nxp.com>
> ---
>  crypto/Kconfig  | 8 ++++++--
>  crypto/Makefile | 6 +++---
>  2 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/crypto/Kconfig b/crypto/Kconfig index f6bfdda..2bdf882 100644
> --- a/crypto/Kconfig
> +++ b/crypto/Kconfig
> @@ -93,11 +93,15 @@ config CRYPTO_AKCIPHER
>  	select CRYPTO_AKCIPHER2
>  	select CRYPTO_ALGAPI
> 
> -config CRYPTO_RSA
> -	tristate "RSA algorithm"
> +config CRYPTO_RSA_HELPER
> +	bool "RSA key extract helper"
>  	select CRYPTO_AKCIPHER
>  	select MPILIB
>  	select ASN1
> +
> +config CRYPTO_RSA
> +	tristate "RSA algorithm"
> +	select CRYPTO_RSA_HELPER
>  	help
>  	  Generic implementation of the RSA public key algorithm.
> 
> diff --git a/crypto/Makefile b/crypto/Makefile index 4f4ef7e..d336d83
> 100644
> --- a/crypto/Makefile
> +++ b/crypto/Makefile
> @@ -36,10 +36,10 @@ $(obj)/rsaprivkey-asn1.o: $(obj)/rsaprivkey-asn1.c
> $(obj)/rsaprivkey-asn1.h  clean-files += rsapubkey-asn1.c rsapubkey-asn1.h
> clean-files += rsaprivkey-asn1.c rsaprivkey-asn1.h
> 
> -rsa_generic-y := rsapubkey-asn1.o
> -rsa_generic-y += rsaprivkey-asn1.o
> +crypto_rsa_helper-y += rsapubkey-asn1.o rsaprivkey-asn1.o rsa_helper.o
> +obj-$(CONFIG_CRYPTO_RSA_HELPER) += crypto_rsa_helper.o
> +
>  rsa_generic-y += rsa.o
> -rsa_generic-y += rsa_helper.o
>  rsa_generic-y += rsa-pkcs1pad.o
>  obj-$(CONFIG_CRYPTO_RSA) += rsa_generic.o
> 
> --
> 1.8.3.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the
> body of a message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Herbert Xu April 5, 2016, 12:32 p.m. UTC | #2
On Wed, Mar 23, 2016 at 05:04:18PM +0200, Tudor Ambarus wrote:
> All RSA implementations can now use the key extract symbols
> by selecting CRYPTO_RSA_HELPER.
> 
> Signed-off-by: Tudor Ambarus <tudor-dan.ambarus@nxp.com>

Please don't.  Just keep it in the generic rsa module and have
the drivers depend on that instead.

Thanks,
diff mbox

Patch

diff --git a/crypto/Kconfig b/crypto/Kconfig
index f6bfdda..2bdf882 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -93,11 +93,15 @@  config CRYPTO_AKCIPHER
 	select CRYPTO_AKCIPHER2
 	select CRYPTO_ALGAPI
 
-config CRYPTO_RSA
-	tristate "RSA algorithm"
+config CRYPTO_RSA_HELPER
+	bool "RSA key extract helper"
 	select CRYPTO_AKCIPHER
 	select MPILIB
 	select ASN1
+
+config CRYPTO_RSA
+	tristate "RSA algorithm"
+	select CRYPTO_RSA_HELPER
 	help
 	  Generic implementation of the RSA public key algorithm.
 
diff --git a/crypto/Makefile b/crypto/Makefile
index 4f4ef7e..d336d83 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -36,10 +36,10 @@  $(obj)/rsaprivkey-asn1.o: $(obj)/rsaprivkey-asn1.c $(obj)/rsaprivkey-asn1.h
 clean-files += rsapubkey-asn1.c rsapubkey-asn1.h
 clean-files += rsaprivkey-asn1.c rsaprivkey-asn1.h
 
-rsa_generic-y := rsapubkey-asn1.o
-rsa_generic-y += rsaprivkey-asn1.o
+crypto_rsa_helper-y += rsapubkey-asn1.o rsaprivkey-asn1.o rsa_helper.o
+obj-$(CONFIG_CRYPTO_RSA_HELPER) += crypto_rsa_helper.o
+
 rsa_generic-y += rsa.o
-rsa_generic-y += rsa_helper.o
 rsa_generic-y += rsa-pkcs1pad.o
 obj-$(CONFIG_CRYPTO_RSA) += rsa_generic.o