From patchwork Wed Feb 17 03:20:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 383790 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp2465358jao; Tue, 16 Feb 2021 19:21:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRewyxGRswScyQsB5R3JlUspcmxpX1OxxolyQYej0KMroxQ8y+ZylpAtzrtN4m/cftvF6E X-Received: by 2002:a17:906:1c11:: with SMTP id k17mr23059362ejg.70.1613532065856; Tue, 16 Feb 2021 19:21:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613532065; cv=none; d=google.com; s=arc-20160816; b=iXP9HelQK5yIivxzVwS131mKN5ZddDr6oyRbOGXt6vaZUzl+GnyDcsXkhxsG+9qsgr sxuz6OrpXHm/Qd3pooFKrOSaBy7RYvIDiDBZypg72JVnchPNublALIfumlvV0Oteay// w955ur7adcZs+td7/cC7wuFMvdftlse5zTDXl0Oe5Lhfp8rEEVZtszuBoG1YTIDFQi4c sjiupNc2FCFrk8fnGlajS5FOUFFnwa+48Z2rPEm+uDorzjE0hhUQSjpViOeOcDRWge0e fprbbEvCFH/f0n66zXWqZh1bgzNV6dw4zUCxXmbe5zDCssRjBVyIKcde/JpcmJkC5BJA jz4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=kmHuzpGYRj+uDRrnF2Zywn+rim3ippwTb7pyHqpEKmU=; b=tHk55YeHN/Mhdx74BbIyX72uBaYt55pj7zCCibd+KQhXA2PnzPb64K3cdhhshvRcql drVJ1mufRNG6jpoK2ZIK2PmXrrXD3cpydiJok+d1sWB9i854953GizQE8LjBgLAlKMob 7H1RU3YwwItpZ3RVytJRWj4lpTh8Pahf1OgF6BBJppfaE9WVg7Spy5afkHPFpA6r9lgH MXIQUDrJ1VTT14Gj2HYcXtjgUghBG507gIVUtqfgxx0yQb6nsks/aIyh3PAYk5uW1wuU D66afof+tNI/imgqCCNegLZ8hhjwQ3pxapR4ZGwKTawzLFGl3R1ZIwmhJqUXl6UtkgxS 6F+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=clRTIjaK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id h27si756230ejd.660.2021.02.16.19.21.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 19:21:05 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=clRTIjaK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BF00082844; Wed, 17 Feb 2021 04:21:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="clRTIjaK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8FD2A827CF; Wed, 17 Feb 2021 04:20:59 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_SBL_CSS,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (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 91313827CF for ; Wed, 17 Feb 2021 04:20:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=joel.stan@gmail.com Received: by mail-pl1-x630.google.com with SMTP id g20so6699808plo.2 for ; Tue, 16 Feb 2021 19:20:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kmHuzpGYRj+uDRrnF2Zywn+rim3ippwTb7pyHqpEKmU=; b=clRTIjaKZYCtsnszPJBeGPkJ6L5KWAgT/tC7atOwyRhVqAqXFYd5xMZASLHzFlXdXT 3y9WtK9S79MC7R9l8H/p6I+mL6YMyP9YyjOXHDivD1TJ7Ms04Rjw6lQXp9rhZfB5cQGb f4cnu5vddaX1+Rrk5Z3DvbxcYddtH07rI0BtZKYzapnwcu1OmJh5mL4TkwHsDe6mMJ8X ZZ4vciuJ8pzFshyJR+t9FcJ/oeGeZzTiraNlRiaVgWSwydqdAmtz/NgA9eKQS2yZb1BQ 7thI6SY/s6rjHr3O3eufCJ9USAEEeckT6tf9/3nqxQrkcXXDWiqQNUNKwqGL7QO0mhXY EFww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=kmHuzpGYRj+uDRrnF2Zywn+rim3ippwTb7pyHqpEKmU=; b=DK653tPtQXUprEjmw9XdEmBpjERQ07gWhV046rh/CHJhl4HqUux+yo9eLSLAq7WTWm QOG7Ksljh4bHOQT1xfNfFryQtBgRpHxhUcT5chd9vL+2N5kLDIggsDDu7dZ03rBwltYP iGPniFzqTCRE7Qh8x7k1ICDd0xV1Vp0JJVZMLFW3tFbny4LpT74pgvV32okSn0gFB4kN Q0qYZ5ZkKDTCRkCyCphbFa/0Rmnnnb+fC/2+sqR0DNS1Z02vnFRSiWilsqBhvhV0nCN5 jkEpszcANq5Di7YD/JDLq1C4XewQg40TR3LohiPKEZlaTdOXvDX9dLxqixZgQSnm95TM ybgA== X-Gm-Message-State: AOAM530eEcIY6BV+IoF61UkX3YmYRGsn18bbvfgkoyOKKo1pT5DpypZX bx2wKm4A+FORkSGwRopcxjw= X-Received: by 2002:a17:90a:fe0e:: with SMTP id ck14mr7035936pjb.232.1613532054792; Tue, 16 Feb 2021 19:20:54 -0800 (PST) Received: from voyager.lan ([45.124.203.14]) by smtp.gmail.com with ESMTPSA id 4sm336466pjc.23.2021.02.16.19.20.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Feb 2021 19:20:53 -0800 (PST) From: Joel Stanley To: Simon Glass , u-boot@lists.denx.de Cc: Andrew Jeffery Subject: [PATCH 0/3] Improvements to FIT hashing Date: Wed, 17 Feb 2021 13:50:39 +1030 Message-Id: <20210217032042.425512-1-joel@jms.id.au> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean Here are some small changes to the FIT hashing code in order to use more code from common/, which in turns allows hw implementations of SHA. This was motivated by a need to reduce the SPL size for the Aspeed platforms by using the hardware engine. I have a driver for the Aspeed SoC that I will submit. Joel Stanley (3): hw_sha: Fix coding style errors fit: Use hash.c to call SHA code hash: Allow for SHA512 hardware implementations common/hash.c | 24 ++++++++++++++++++++++-- common/image-fit.c | 34 ++++++++-------------------------- include/hw_sha.h | 38 ++++++++++++++++++++++++++++++++------ lib/Kconfig | 15 +++++++-------- 4 files changed, 69 insertions(+), 42 deletions(-) -- 2.30.0