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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9750FC433EF for ; Mon, 21 Mar 2022 19:27:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E3C078394C; Mon, 21 Mar 2022 20:27:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="IAcF6Gym"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A41B883ADC; Mon, 21 Mar 2022 19:44:00 +0100 (CET) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B484B81B5B for ; Mon, 21 Mar 2022 19:43:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=fr0st61te@gmail.com Received: by mail-lj1-x232.google.com with SMTP id g24so19914173lja.7 for ; Mon, 21 Mar 2022 11:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HlpOD77F1YZZoMM6kwT4oBZwi6QrKSLzWKZUOx7nvVM=; b=IAcF6GymHLraO7ntzZwn5fKRMrARAP9Q0L3bW59TM2DS56EF9UffhnhSGXWDACQ9/U WMz8SEdTDZAp54FvF/iAh7yf5UFB148Ve+XZMLteYQxtOEvzGe5vta9kKmwbcPnHie6S Ol8ddeCGd3DCev49ntTgePgBxRVN80/x8HmBtPmGDjXkbAHTDJ0phxNrnUz7/OwbvCaa WF3Tq/6YJCXghboyk58aD6QbDSemvLZmEKk+k/ZMvLLChfCPed40OMbNHBY8jSHv6jA/ b2NpvMpt2wyR4FS2OYXMLSnOY3miAJjT+obtys4DyWxFl7KuRr2Y2amzhuKi2bCEr/i1 kpFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HlpOD77F1YZZoMM6kwT4oBZwi6QrKSLzWKZUOx7nvVM=; b=QTYA4fFCc1AFBJErf6iQm1PsK6LlxWdm4dfv0LRti/nFcywjQIaz7Wl6xWwL8ePAjo VjU4DW7fTmYIxrShmS2aIAHZixR1Wn0LVT0CtN6NiOpRIhprOQXhk5dAKIwA3EmfRrJr TlBtrtC82Zz1OcCvRyIoq81MAHMsQFAU0PX6Bb9FOtuqJgcFGH+IULsMLfxsdsfsm/eT y9mK4eaKcinuIfgjcDhgIqKlkKZM1h48u4ylJwbCawlZ6TYaD7XFFHNHHj6BJFVJQErT PDNI5PhgkAx4PbmoszvyPQ8dFDSstv364y5wl/wuft2SdFqrXpQ/kL7OGUXeaLJDPlfE rcWw== X-Gm-Message-State: AOAM530m3tC7oYbsL79S4rLtcYetM90pftZutxpBo7xD1ukQ/WrOrl22 jRV7+bamPGjaDN/bzANvDow= X-Google-Smtp-Source: ABdhPJxHFpGkUHFQdxcmyrFo/3pzoFVezIaQqCF6sIEfN4oZK8JA9RnxUHM+OdPZqO6BTtnh3adsNg== X-Received: by 2002:a2e:bd13:0:b0:244:da2f:ff4d with SMTP id n19-20020a2ebd13000000b00244da2fff4dmr16675022ljq.213.1647888237046; Mon, 21 Mar 2022 11:43:57 -0700 (PDT) Received: from localhost.localdomain (93-80-66-251.broadband.corbina.ru. [93.80.66.251]) by smtp.googlemail.com with ESMTPSA id m17-20020ac24251000000b00439fe142a0esm1875041lfl.162.2022.03.21.11.43.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 11:43:56 -0700 (PDT) From: Ivan Mikhaylov To: Simon Glass , Jan Kiszka Cc: u-boot@lists.denx.de, Ivan Mikhaylov Subject: [PATCH 0/3] Introduce new sign binman's option Date: Mon, 21 Mar 2022 21:43:16 +0000 Message-Id: <20220321214319.33254-1-fr0st61te@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 21 Mar 2022 20:27:26 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean From: Ivan Mikhaylov This patch introduces prototype of new sign binman's option. Enhancing the sign procedure, as example: mkimage -G privateky -r -o sha256,rsa4096 -F fit.fit binman replace -i flash.bin -f fit.fit fit into: binman sign -i flash.bin -k privatekey -a sha256,rsa4096 -f fit.fit fit It works with extracted FIT container and image, which provides key signing and replacing FIT container in directed image. Also, I'll add additional enhancement in future to this procedure with skipping on FIT container and providing extract->sign->replace in whole instead of sign->replace with documentation update and test as well. As example: binman sign -i flash.bin -k privatekey -a sha256,rsa4096 -f fit Ivan Mikhaylov (3): binman: add sign option for binman binman: add documentation for binman sign option binman: add test for sign option tools/binman/binman.rst | 10 +++++ tools/binman/cmdline.py | 13 ++++++ tools/binman/control.py | 26 +++++++++++- tools/binman/ftest.py | 42 +++++++++++++++++++ tools/binman/test/225_fit_sign.dts | 67 ++++++++++++++++++++++++++++++ 5 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 tools/binman/test/225_fit_sign.dts -- 2.35.1