From mboxrd@z Thu Jan 1 00:00:00 1970 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 BB8A7C433EF for ; Wed, 1 Jun 2022 18:26:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33BE2842B6; Wed, 1 Jun 2022 20:26:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="I4yacjl6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0F9FC842F1; Wed, 1 Jun 2022 20:26:38 +0200 (CEST) Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 51A3283E81 for ; Wed, 1 Jun 2022 20:26:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=loic.poulain@linaro.org Received: by mail-wm1-x330.google.com with SMTP id m32-20020a05600c3b2000b0039756bb41f2so1551710wms.3 for ; Wed, 01 Jun 2022 11:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=BKqlqGxYfhX7iegO3RAXuVwHjUD9PXyPls5TexgxH30=; b=I4yacjl6Unoz8ZtqpTt3n3vL4tbonSzMLLaDo8CrdpQ9rQwrGjyhZgHht47JPApmu/ TlNkxk/eudyZHPrtssfkO0rgYFQn+uPUq6kJqwKS1Kz7a1gkpGkTfMyW5qFnKmAmU/vM r4XjKS9tCLLQXURz5/lKBDM+ODUk9eThgipGqpuHS+b5wQZ6yBmYR19ndEaGdqN2MzLA jLdcOCjBmhbTyimEuXj2ZXPW090CsMR6YWUaTWZ9+8SV8KSbh7KbE6+XZ61aHXHDKvEP giH94YD70BCXZWddEyyRzhIm1YK6NwxOdCCZZUlpQ72BncAZaw9JYFSF0N5FZzbUt72f wNNA== 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; bh=BKqlqGxYfhX7iegO3RAXuVwHjUD9PXyPls5TexgxH30=; b=xNtjmzv4bw/hDdZghWrYCXsPyxD/3bw/06PYIiamxBrFD+pL+ZtHXQSy15LTFQVuog 8dLGkabkYqLqD1Iyz7O2TB6llSOrp6oBRTcTZoTzdgNJQ59sdbtahKjICswh0qe1Vb2h 3FfMsYn+cUVMD4MaImb/RHUtSEeu3cB0WKnVYW1NAIVkrMs/x3MPuAZj6G0v9/75YU+d xRqvk7RL9fze+m1iF3fmuvRAkrVZuOowhVRj7Glafo/n548JzzzsPAG66GDEwLQB/MB7 B6xidBnWzPOdDPTboGrBen5YT7k6WzNr5qzXgu0jUI1GNBxmaypr2IfE0TqfgltU5yoK pUGw== X-Gm-Message-State: AOAM533f2bn6mg6Nyf7MI0pPE4O3vkoIWqm7x0x5SUwvE3P5S12NPyjo pB8C/mZV/e+x12c/mLeVkmPpIw== X-Google-Smtp-Source: ABdhPJxlWn+hkcUJkMhOQfo1xIWVjAoU4Kz+f4bySqGZkJvP0os3daB7DAHAX8C6tGZZK82vaHFqlg== X-Received: by 2002:a05:600c:1d9f:b0:397:4192:4302 with SMTP id p31-20020a05600c1d9f00b0039741924302mr29514881wms.193.1654107994854; Wed, 01 Jun 2022 11:26:34 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:82c:5f0:58:ccc3:729d:30c2]) by smtp.gmail.com with ESMTPSA id m30-20020a05600c3b1e00b00395f15d993fsm6672837wms.5.2022.06.01.11.26.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jun 2022 11:26:34 -0700 (PDT) From: Loic Poulain To: trini@konsulko.com Cc: u-boot@lists.denx.de, michal.simek@xilinx.com, kettenis@openbsd.org, Loic Poulain Subject: [PATCH v2 0/5] Add ARMv8 CE sha1/sha256 support Date: Wed, 1 Jun 2022 20:26:26 +0200 Message-Id: <1654107991-598-1-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 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 This series adds support for the SHA-1 and SHA-256 Secure Hash Algorithm for CPUs that have support of the ARM v8 Crypto Extensions. It Improves speed of integrity & signature checking procedures. V2: - Add cover letter & sha256 support. - Kconfig default 'y' only if SHA1 and SHA256 selected Loic Poulain (5): lib: sha1: Add support for hardware specific sha1_process sha1: Fix digest state size/type armv8 SHA-1 using ARMv8 Crypto Extensions: lib: sha256: Add support for hardware specific sha256_process armv8 SHA-256 using ARMv8 Crypto Extensions arch/arm/cpu/armv8/Kconfig | 15 ++++ arch/arm/cpu/armv8/Makefile | 2 + arch/arm/cpu/armv8/sha1_ce_core.S | 132 +++++++++++++++++++++++++++++++++++ arch/arm/cpu/armv8/sha1_ce_glue.c | 21 ++++++ arch/arm/cpu/armv8/sha256_ce_core.S | 134 ++++++++++++++++++++++++++++++++++++ arch/arm/cpu/armv8/sha256_ce_glue.c | 21 ++++++ include/u-boot/sha1.h | 2 +- lib/sha1.c | 26 +++++-- lib/sha256.c | 26 +++++-- 9 files changed, 364 insertions(+), 15 deletions(-) create mode 100644 arch/arm/cpu/armv8/sha1_ce_core.S create mode 100644 arch/arm/cpu/armv8/sha1_ce_glue.c create mode 100644 arch/arm/cpu/armv8/sha256_ce_core.S create mode 100644 arch/arm/cpu/armv8/sha256_ce_glue.c -- 2.7.4