From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 22 Jul 2024 10:24:59 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sVoLr-001kpg-0P for lore@lore.pengutronix.de; Mon, 22 Jul 2024 10:24:59 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sVoLp-0000DM-8A for lore@pengutronix.de; Mon, 22 Jul 2024 10:24:58 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=dUvzYQgwsSfOPfO/wl/2W8LjIU0V3MPhxMmAJUshGJw=; b=Gt/AJ/5G1dcbFocYNaIWmcak5V 6znBgBLBT8QPr5FHaguePDhHPGDhvovpvOaX3toAUn9+oj3eKqOxh37+41vZKPEMGwTTX65udfX2x OEO6954rj4ED2H1OaUvMcxtBjDeSTOl1bWeC/jzCh5t3XZtCNX23s033Oxm518BpOU3k3DSDhXyst gyIrR9yI53YplwqoAcg24AtTMCeI61BWmn1cTpTYZG2X/th57YhCUT00KRhjjsngxVl3An1WlbfSI hHevnLq0OdkrcOx7nGtOaASzujUIg1myLQZ3vki/imuhzWmKmdBLeOk0iXlkkxviEfd9Jio6fBXjt QP2Tzvaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVoLD-00000008rmW-2tij; Mon, 22 Jul 2024 08:24:19 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVoL6-00000008riX-1fkk for barebox@lists.infradead.org; Mon, 22 Jul 2024 08:24:15 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sVoL2-0008Fl-BM; Mon, 22 Jul 2024 10:24:08 +0200 Received: from [2a0a:edc0:0:1101:1d::28] (helo=dude02.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sVoL1-001L9W-Ug; Mon, 22 Jul 2024 10:24:07 +0200 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1sVoL1-00629B-2g; Mon, 22 Jul 2024 10:24:07 +0200 From: Sascha Hauer To: Barebox List Date: Mon, 22 Jul 2024 10:23:56 +0200 Message-Id: <20240722082405.926111-1-s.hauer@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240722_012412_527284_48DA254D X-CRM114-Status: GOOD ( 14.54 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.3 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 0/9] Add ECDSA support for FIT image verification X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) This series implements ECDSA signature verification for FIT images. The ECDSA code itself is taken from the Kernel. Currently only supported way to specify a ECDSA key is to compile it into the binary using CONFIG_CRYPTO_ECDSA_KEY, taking it from a device tree is not yet supported. Sascha Hauer (9): errno: include string for EOPNOTSUPP rsatoc: switch to non deprecated openssl API rsatoc: rename to keytoc keytoc: add ecdsa support malloc: implement free_sensitive() Add elliptic curve cryptography (ECC) helper functions crypro: add ECDSA support crypto: make RSA a visible option fit: Add ecdsa support common/Kconfig | 1 - common/dlmalloc.c | 15 + common/image-fit.c | 113 +- common/misc.c | 1 + common/tlsf_malloc.c | 11 + crypto/Kconfig | 28 +- crypto/Makefile | 22 +- crypto/ecc.c | 1661 +++++++++++++++++++++++++++++ crypto/ecc_curve_defs.h | 155 +++ crypto/ecdsa.c | 169 +++ include/asm-generic/barebox.lds.h | 7 + include/crypto/ecc_curve.h | 62 ++ include/crypto/ecdh.h | 83 ++ include/crypto/internal/ecc.h | 278 +++++ include/dma.h | 5 + include/ecdsa.h | 21 + include/linux/slab.h | 5 + include/malloc.h | 1 + scripts/.gitignore | 2 +- scripts/Kconfig | 4 +- scripts/Makefile | 6 +- scripts/Makefile.lib | 12 +- scripts/{rsatoc.c => keytoc.c} | 329 +++--- test/self/Makefile | 2 +- 24 files changed, 2806 insertions(+), 187 deletions(-) create mode 100644 crypto/ecc.c create mode 100644 crypto/ecc_curve_defs.h create mode 100644 crypto/ecdsa.c create mode 100644 include/crypto/ecc_curve.h create mode 100644 include/crypto/ecdh.h create mode 100644 include/crypto/internal/ecc.h create mode 100644 include/ecdsa.h rename scripts/{rsatoc.c => keytoc.c} (68%) -- 2.39.2