From patchwork Wed Mar 23 15:04:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 8650751 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A9425C0553 for ; Wed, 23 Mar 2016 15:04:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C11E120259 for ; Wed, 23 Mar 2016 15:04:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D19B120211 for ; Wed, 23 Mar 2016 15:04:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754459AbcCWPEh (ORCPT ); Wed, 23 Mar 2016 11:04:37 -0400 Received: from mail-bl2on0093.outbound.protection.outlook.com ([65.55.169.93]:13563 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753113AbcCWPEg (ORCPT ); Wed, 23 Mar 2016 11:04:36 -0400 Received: from BLUPR0301CA0020.namprd03.prod.outlook.com (10.162.113.158) by CY1PR0301MB1596.namprd03.prod.outlook.com (10.162.166.22) with Microsoft SMTP Server (TLS) id 15.1.443.7; Wed, 23 Mar 2016 15:04:32 +0000 Received: from BN1AFFO11FD010.protection.gbl (2a01:111:f400:7c10::177) by BLUPR0301CA0020.outlook.office365.com (2a01:111:e400:5259::30) with Microsoft SMTP Server (TLS) id 15.1.443.12 via Frontend Transport; Wed, 23 Mar 2016 15:04:32 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD010.mail.protection.outlook.com (10.58.52.70) with Microsoft SMTP Server (TLS) id 15.1.443.6 via Frontend Transport; Wed, 23 Mar 2016 15:04:32 +0000 Received: from enigma.ea.freescale.net (enigma.ea.freescale.net [10.171.77.120]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u2NF4M5s030045; Wed, 23 Mar 2016 08:04:30 -0700 From: Tudor Ambarus To: , CC: , , , Tudor Ambarus Subject: [PATCH v2 3/4] crypto: add CONFIG_ symbol for rsa helper Date: Wed, 23 Mar 2016 17:04:18 +0200 Message-ID: <1458745459-1096-4-git-send-email-tudor-dan.ambarus@nxp.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1458745459-1096-1-git-send-email-tudor-dan.ambarus@nxp.com> References: <1458745459-1096-1-git-send-email-tudor-dan.ambarus@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131032190723972741; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(85426001)(104016004)(81166005)(19580395003)(48376002)(2950100001)(19580405001)(36756003)(5003940100001)(50226001)(586003)(5001770100001)(6806005)(50466002)(2906002)(76176999)(50986999)(189998001)(86362001)(1220700001)(87936001)(4326007)(1096002)(77096005)(11100500001)(92566002)(106466001)(105606002)(47776003)(5008740100001)(229853001)(33646002)(7059030)(4720700001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1596; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD010; 1:rlGW/t6FvQ4MaTkHPvA4AJPD5UgVv+M/I1Sc2O3d1y9qob63kycxwUCZBtSliXlykU+aGIgmJXHZEjZ2yKvkV77nVKVva2ERthWvBMbKhnBAnw+Dhqqy1xRFYlP0IPJ85xBlDB+V8X/Yg/HZKeeNJxY5jFzXD7iaI1oey0ll+gd6C8rtPzngWMEhXJfoeRJTx5xs1pZlS0Cz4e3DrFAmTaIap1eYKth7U7Fg8rHnfqHth9uCFzRHKIn+MO8k7hEEgKHlG20NmquogWyvrpUs0+DMCK4tnABAeHEON3yZVcMivV/AJQqZFt0zZZ14Esgw+FI/1p0/NXU7sNIfR+I/PiV/H9Y2zs05PimI5PByHzzFTa3+RXJHPiH8o/sg226nxcPJNTqZVgnuh3cfIGPZtZ800UPsV2LKcyKDxWNTPmVLL3bN6ZKMB+tlVTS+pbd2UvI8zT1hCTzCcmMG00dydTscMs6/ABc/1ViH6iMSHH4YyUs1MtZdtYPpW1ieOSag6xNvOo7hgvO7UsoY2O41niwlnFATUyyWZGfdXTM6VYVsIZ04PoCfAb0mv5eIylmp4O+S5zjoJZLnq1/O4BPLoP5qsWLISq1sltre5gLmx8kJuI2T7Vv60Um3WgIgFGxx15SRL3ZtGqmJBNyfzoBe60tt0fHUa5QBbs9VYdwyzCM= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 81aedcc6-29e8-46c8-9bc3-08d3532c70b0 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1596; 2:3SqMIEUFO2tXm1ErOqe3fi1ZgrnTLmt60udO3ZStpt29zJ4AyFc8+9vJxmkR5fmVzndy2JoRG8va2irUkyBs5YoB/ZtdF5d1RqRA8/+X7DPZ3ZZI23Nzzs07qM8PqOwXIQxdPsrtu1+r0S6N0rz7m9/+DjMcHXe9qiwd69pHJGwLJEnG6d58j00jhE+8qHJx; 3:EZYY0CCIb/DAHXOOVnVqvf7QdUDf66x+N/83l0+MidaTS2y+kaB4tcmvLGQGt9Pb6UiHx2itZ+Uusf8tiQydpVyOy52oqxrIHVmiHtnd1XWSrqrNE02WkRR+XSU9WopImL8f91o6jDi1lX5aOFWvIeec/Pptx2aY5RD0aJKQRlI2cMoc4teI3/+NQ4uxhy44MSU8Lp+gt5FUjKYyAdAU/+JSCka5n/cy+k2rf2oDw3M=; 25:iZ6y5TGIayi8zk6jTNdOUXIkf7uXp5M5jW3JGZ144IXd8VddTNsSWE/l3+E+HbsF12lKO76oFQkQ1eolop41uX1aJhA/hLL4KKCIzgxI0qrAuU1tbs1M6hJ2R5hheiyX428Xxv+Si+2OJsC2vsap7D0aCI0lMDC5F0fThI0agG5tu2gJi7QEqYWUwN9NOLW1KofHhI8yUUlFSdSvJuX9Ygl2KEAC2NHn/Bg2yK+N8HknNA6ts+0EJ6GfzV4yvDiHxHwyFnkMPmRcHvT9IPYg0PV1WlKVbrz4P3MaArd8ngN2WGvO/DwAnJ3847P60Sx6c2T1IMTUmvucTPdeLb6q6YRNFalaPtSqmVtLiUzj+VE48WzN5XJ+OwrOM1b43i2pNMK4Scypc9NTvUlqtevcEfa83PmBvgK/VpUPxYTngQC+fafZSu626y3W5DQ/O93GFmyBZPqzzBGNkSZO9oUnd7w/gE7GaM1o7LtP9h3UgtamsBa54ywUc 2HgrAP7K1I64KSHwOFx1vV1Ik5IZ9vvOA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1596; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13024025)(5005006)(13023025)(13017025)(13015025)(13018025)(8121501046)(10201501046)(3002001); SRVR:CY1PR0301MB1596; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB1596; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1596; 4:3kbutf/BYBzA6s0gCF8G5l4XtHKA0Y72/J1+6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LBNb60ccGn8iR7TUkg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2016 15:04:32.1944 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1596 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All RSA implementations can now use the key extract symbols by selecting CRYPTO_RSA_HELPER. Signed-off-by: Tudor Ambarus Acked-by: Cristian Stoica --- 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