From patchwork Fri Jan 12 13:15:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 124340 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2048984qgn; Fri, 12 Jan 2018 05:15:38 -0800 (PST) X-Google-Smtp-Source: ACJfBosUaaDGzeqlpYznjjCLl+TctTBzQHmzi3Q1hqpD6trYPBG5PeW8PxQra///M6hTeEzFl5vY X-Received: by 10.159.194.12 with SMTP id x12mr26139266pln.198.1515762938757; Fri, 12 Jan 2018 05:15:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515762938; cv=none; d=google.com; s=arc-20160816; b=LXvly9GxF7BOeJHpW9q2hFgDVSdL5VM9wUS3WS490uB0ghoGoSMgSib69K1KPTJwGK 9mzgLa1Cs57Vx61wlArZCkNF3QgikRDfCj4+bPFGFZ/NCVcyzjCPp13HvjWjo65ZHWrC zzCUhwmIcYIm/nt2P5FjNVGpTXsf3FGXqgryHUJCIgyp76ZxZV3a4Q10pyAC0UXnIFj5 auXW+vWL8w7Kgo5hioBVjv9Bcw3BxVWQaatA1oBFlIzXt+2wZv6TY3Mkmc/rKSlTgwpp tOrcshO5iJnAXNiNNR4uKC//kqpMr6u17KWk6RGwn7QWUYSGuQyydbqz94IV4znmZ7JN hGNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=H+XiWV06tGOkK9t73FH8R1lVaLqS8exUO36+a0jdxDY=; b=i7YuzDWcLlIzdoNRK706+LoeXBJ2JAFiFRzKhlPfDNTxLMoyU2uka18Gye8KGi7GvG ltaYNHmDjSlnhGRVS0vBCf17KEhmFECt5fljpWazSEAW4X/1aAj81N9IK+sttQMPkKf3 1QUg5E6xOd8viN6iWPELGgvPccLrMHjXUNeehm0lH8ltcr0F0aeqQOTPP6xV0mPeN0Ps BFZphI6BaE9WOXrJeUE1BqEu16/eewu6DpCAR8fjYtvsnP5SjgCVH8rihjvE4QsksJ30 zlooFk76M8tDMhuKsS9NdZRCjcHW1rdINooz5Hw2HSLFhHDssjhaxf/ebJ20l6t1ImTw G9Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xx01INy3; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c29si3834030pgn.727.2018.01.12.05.15.38; Fri, 12 Jan 2018 05:15:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xx01INy3; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933478AbeALNPh (ORCPT + 1 other); Fri, 12 Jan 2018 08:15:37 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:43023 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933357AbeALNPg (ORCPT ); Fri, 12 Jan 2018 08:15:36 -0500 Received: by mail-wm0-f67.google.com with SMTP id g1so11998969wmg.2 for ; Fri, 12 Jan 2018 05:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=H+XiWV06tGOkK9t73FH8R1lVaLqS8exUO36+a0jdxDY=; b=Xx01INy3jf+3R64dHxfDBLMNza3lS4NmlcqxjMCeWgiKgf5gzUVCvDGRNJ98EjyBvF vVj0vZx/fD4WMYU810xxDoE1fU1UWHKem5SQx8oNUN2zFWzRMvo+GfI75slDnrNu+xAv k3T9LO5+SWsA/OncmpFt7hoSo68Us67Zx/EJM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=H+XiWV06tGOkK9t73FH8R1lVaLqS8exUO36+a0jdxDY=; b=iQzrZEmgN8+0/7UfiO2ZuyQVMY0AUcGZpS+VwaPQCo8mFBOv/5NMiOpHk3YR6CUtUQ SR/21kMkdLUXKUS9FqvAbS6OJePW62ZRljhyf7WGMjQsSjz/Kev9dKSUexWnmgULFB++ bMyelNdiiwl33CpA/xwYCpu3xuG919Q9XNn24BluMVeqlMEJWc+aSGX9CzyRjg6BW6qZ +9NXPpt/QctBoA0EIGIjq/0vbUh8dR2h2T2CbpfXSaZReE50DsKzqyyrKbTMS8IVGhMC trc0hf8N23PZdjCyC30PDEgRAm9hrd5BqlGpwVIRY8+ukIp7OC1p+DfBScLwgvh8MzPI 3P+Q== X-Gm-Message-State: AKwxytdJ/3UU8lHIv/clgdyxu7VgAg19vsij0QImIMWOox82Ru0XC3gs b8RpOFD6Kb5ZaidzbusokXjJtw== X-Received: by 10.28.175.66 with SMTP id y63mr3761343wme.7.1515762935539; Fri, 12 Jan 2018 05:15:35 -0800 (PST) Received: from localhost.localdomain ([105.141.218.128]) by smtp.gmail.com with ESMTPSA id o98sm16081395wrb.19.2018.01.12.05.15.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jan 2018 05:15:34 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, will.deacon@arm.com, catalin.marinas@arm.com, steve.capper@linaro.org, jgarzik@redhat.com, Ard Biesheuvel Subject: [PATCH 0/5] sha3 fixes and new implementation for arm64 Date: Fri, 12 Jan 2018 13:15:17 +0000 Message-Id: <20180112131522.25663-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Add an implementation of SHA3 to arm64 using the new special instructions (#4) In preparation of that, fix a bug in the SHA3 and refactor it a bit so it can serve as a fallback for the other code. Also, add some new test vectors to get better test coverage. Ard Biesheuvel (5): crypto/generic: sha3 - fixes for alignment and big endian operation crypto/generic: sha3 - simplify code crypto/generic: sha3 - export init/update/final routines crypto/arm64: sha3 - new implementation based on special instructions crypto/testmgr: sha3 - add new testcases arch/arm64/crypto/Kconfig | 6 + arch/arm64/crypto/Makefile | 3 + arch/arm64/crypto/sha3-ce-core.S | 224 ++++++++ arch/arm64/crypto/sha3-ce-glue.c | 156 ++++++ crypto/sha3_generic.c | 198 +++---- crypto/testmgr.h | 550 ++++++++++++++++++++ include/crypto/sha3.h | 6 +- 7 files changed, 1012 insertions(+), 131 deletions(-) create mode 100644 arch/arm64/crypto/sha3-ce-core.S create mode 100644 arch/arm64/crypto/sha3-ce-glue.c -- 2.11.0 Tested-by: Steve Capper