From patchwork Tue Dec 30 09:30:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruchika Gupta X-Patchwork-Id: 424594 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 533DC14009B for ; Tue, 30 Dec 2014 20:33:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 41E494B632; Tue, 30 Dec 2014 10:33:20 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c8RjbaESja4L; Tue, 30 Dec 2014 10:33:20 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 489694B66E; Tue, 30 Dec 2014 10:32:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BDCBE4B65F for ; Tue, 30 Dec 2014 10:32:28 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8sY1U85LYrBN for ; Tue, 30 Dec 2014 10:32:28 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0126.outbound.protection.outlook.com [207.46.100.126]) by theia.denx.de (Postfix) with ESMTPS id 3D7DE4B610 for ; Tue, 30 Dec 2014 10:32:10 +0100 (CET) Received: from CH1PR03CA009.namprd03.prod.outlook.com (10.255.156.154) by BL2PR03MB146.namprd03.prod.outlook.com (10.255.230.18) with Microsoft SMTP Server (TLS) id 15.1.49.12; Tue, 30 Dec 2014 09:32:08 +0000 Received: from BL2FFO11FD056.protection.gbl (10.255.156.132) by CH1PR03CA009.outlook.office365.com (10.255.156.154) with Microsoft SMTP Server (TLS) id 15.1.49.12 via Frontend Transport; Tue, 30 Dec 2014 09:32:07 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD056.mail.protection.outlook.com (10.173.161.184) with Microsoft SMTP Server (TLS) id 15.1.49.13 via Frontend Transport; Tue, 30 Dec 2014 09:32:07 +0000 Received: from perf-idc04.ap.freescale.net (perf-idc04.ap.freescale.net [10.232.14.49]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id sBU9Vbqj028596; Tue, 30 Dec 2014 02:32:04 -0700 From: Ruchika Gupta To: , Date: Tue, 30 Dec 2014 15:00:14 +0530 Message-ID: <1419931816-19485-7-git-send-email-ruchika.gupta@freescale.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1419931816-19485-1-git-send-email-ruchika.gupta@freescale.com> References: <1419931816-19485-1-git-send-email-ruchika.gupta@freescale.com> X-EOPAttributedMessage: 0 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=ruchika.gupta@freescale.com; X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(199003)(189002)(19580405001)(99396003)(50986999)(97736003)(2950100001)(77096005)(19580395003)(85426001)(76176999)(68736005)(21056001)(50466002)(107046002)(229853001)(84676001)(92566001)(62966003)(120916001)(69596002)(89996001)(48376002)(47776003)(86362001)(104016003)(81156004)(106466001)(20776003)(6806004)(46102003)(33646002)(77156002)(105606002)(87936001)(64706001)(50226001)(36756003)(4396001)(31966008); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR03MB146; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB146; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BL2PR03MB146; X-Forefront-PRVS: 04410E544A X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB146; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Dec 2014 09:32:07.9222 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB146 Cc: Ruchika Gupta Subject: [U-Boot] [PATCH 7/9] [v4] lib/rsa: Add Kconfig for devices supporting RSA Modular Exponentiation X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Kconfig option added for devices which support RSA Verification. 1. RSA_SOFTWARE_EXP Enables driver for supporting RSA Modular Exponentiation in Software 2. RSA_FREESCALE_EXP Enables driver for supporting RSA Modular Exponentiation using Freescale specific driver The above drivers use RSA uclass Signed-off-by: Ruchika Gupta CC: Simon Glass --- Changes in v4: Introduced 2 options when CONFIG_RSA is selected: RSA_SOFTWARE_EXP RSA_FREESCALE_EXP Removed RSA_HW. Changes the name pf RSA_SW to RSA_SOFTWARE_EXP Changes in v3: New patch lib/Kconfig | 10 +--------- lib/rsa/Kconfig | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 lib/rsa/Kconfig diff --git a/lib/Kconfig b/lib/Kconfig index f317f81..a1f30a2 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -27,14 +27,6 @@ config SYS_HZ get_timer() must operate in milliseconds and this option must be set to 1000. -config RSA - bool "Use RSA Library" - depends on DM - help - RSA support.This enables the RSA algorithm used for FIT image - verification in U-Boot. RSA support for Modular exponentiation - is implemented as a driver model. Driver Model should be enabled - to select this option. - See doc/uImage.FIT/signature.txt for more details. +source lib/rsa/Kconfig endmenu diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig new file mode 100644 index 0000000..14155b9 --- /dev/null +++ b/lib/rsa/Kconfig @@ -0,0 +1,30 @@ +config RSA + bool "Use RSA Library" + depends on DM + select RSA_FREESCALE_EXP if FSL_CAAM + select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP + help + RSA support.This enables the RSA algorithm used for FIT image + verification in U-Boot. RSA support for Modular exponentiation + is implemented as a driver model. Driver Model should be enabled + to select this option. + See doc/uImage.FIT/signature.txt for more details. + +if RSA +config RSA_SOFTWARE_EXP + bool "Enable driver for RSA Modular Exponentiation in software" + depends on DM && RSA + help + Enables driver for modular exponentiation in software. This is a RSA + algorithm used in FIT image verification. It required RSA Key as + input. + See doc/uImage.FIT/signature.txt for more details. + +config RSA_FREESCALE_EXP + bool "Enable RSA Modular Exponentiation with FSL crypto accelerator" + depends on DM && RSA && FSL_CAAM + help + Enables driver for RSA modular exponentiation using Freescale cryptographic + accelerator - CAAM. + +endif