Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 822B4C433F5 for ; Fri, 5 Nov 2021 10:16:26 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BA19460FC3 for ; Fri, 5 Nov 2021 10:16:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BA19460FC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 797F683195; Fri, 5 Nov 2021 11:16:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 24DAF831F5; Fri, 5 Nov 2021 11:16:21 +0100 (CET) Received: from lizzard.sbs.de (lizzard.sbs.de [194.138.37.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2023F80303 for ; Fri, 5 Nov 2021 11:16:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=siemens.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jan.kiszka@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 1A5AGHXx030489 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 5 Nov 2021 11:16:17 +0100 Received: from [167.87.1.24] ([167.87.1.24]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 1A5AGGcn024785; Fri, 5 Nov 2021 11:16:16 +0100 To: U-Boot Mailing List , Simon Glass From: Jan Kiszka Subject: Injecting public keys into FTDs for FIT verification Message-ID: <067da115-fb58-e4db-8ea1-bff6b305540e@siemens.com> Date: Fri, 5 Nov 2021 11:16:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi all, in order to use CONFIG_FIT_SIGNATURE and also CONFIG_SPL_FIT_SIGNATURE, a public key needs to be placed into the control FDT. So far, I only found mkimage being able to do that during FIT image signing. That is fairly unhandy and often incompatible with how firmware is built & signed vs. how the lifecycle of the artifacts to be loaded and verified look like. Is there really no other way than mkimage -K? I'm currently considering to derive a tool that, given a public key (which is easy to hand around, compared to the private key needed for signing), injects them into a FDT. Then I would hook that up as generic feature for U-Boot builds, enriching all control FTDs already during the first build with this when requested. Am I missing an even simpler approach? Thanks, Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux