Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2840546lqo; Tue, 14 May 2024 10:39:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWqGVGUVATVrd5VSJGzpbDIl06qQjQhWZbQ7U5uEIFeG1QpF9wDCq3LZOtmoUtsGr2dFgnffRJaS1RYHq8TYWLyrSIYfnntKc92eN118g== X-Google-Smtp-Source: AGHT+IFM6GVumz3L0DjOFTU00noUO9tUZ/sNx1LanLVHAPm6Z4YQ7Zl4u/RE/czqk6EyWN3mi8dJ X-Received: by 2002:a05:6358:904d:b0:186:1c42:7240 with SMTP id e5c5f4694b2df-193bb51a4efmr1540256355d.12.1715708354673; Tue, 14 May 2024 10:39:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715708354; cv=pass; d=google.com; s=arc-20160816; b=R2VYLxMwlBTmanRrgomCQNv9EGUVkyWOwIfQ+SQlp3iaeLK94D0ylsdLnc/zIvx3tJ qgiUo9V/lefpkD7sOhphrQKMFPz594D2yuwdg+o7Ak/JuVQ3APGmR3ECaUibNugS3iL0 Irn5ozXHy/t7AMz9CNoKzVkgZ4lVEme5e2LfoCKRZC+CbqEnoZwjFpLMjS2zy4Rz43M1 HeuBac6i3Vk0NDImjRhoX3roz5AL/+V83ZWSYD5UaOhDIJnuI9wR4aXEAc7xvbAxIcQ7 XJLlZR25+1d+mkvOVMBF7dqgUkogDVZ/YkajyJ0nymFfHMepqcnrBjnScMkrvM7neFR8 K/4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=s380DvIVUvrqNkCPvWQHywF6rq8I55TzcUuDNMTmk7A=; fh=9sIOI2awbwD6GP5+AYDUlDzZRr/N76UrryrYCRytm8M=; b=Z/z3B09zGKp4KM7MnU+ey2vyqC6rYBN8bcNQYxUL3R/eg9djhPwWA5OtNOpnzed5t0 cxpXwYq0fSB4G23mk8eHchxMi8kmU0OdMhPWGk2Zu5X5qCLwFhlexz427RZblGqpTWoM fwph65/6PNjFx+PdHFkU+ncazWMPTtrY5sORjateRpXgLvGz0P8DXpNOsIzoWO/35S7n a9BfXbcRKxlkniruogBv0dSWvAmjuDuNHm99GcePdkZeN6CiN0jsKicxlSI0zTsiNZER ovUQYQyYub85g+napzt4wBNLmkhL928WW/57pUhx81Pbnzkbo/QaVoA0ZocJfu4T6Us+ QtFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=k11JKdhY; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-crypto+bounces-4170-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412958ceasi11930825a12.700.2024.05.14.10.39.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 10:39:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4170-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=k11JKdhY; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-crypto+bounces-4170-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4170-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id F057CB2216E for ; Tue, 14 May 2024 17:39:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F8BF17F39D; Tue, 14 May 2024 17:39:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="k11JKdhY" X-Original-To: linux-crypto@vger.kernel.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5DB35A0F9; Tue, 14 May 2024 17:39:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715708345; cv=none; b=Z+p70FYuk0gLdeBr0IESkNwCfv9L7IatjPrdQye4EOqrX5C07VsWSuIgzrlnjPkiBSKUhIu1WkEx6B4sGSkTJdxgokXue0gD00imK4C28OZp6+M3Lt4htq+NQPh5SFdEjE4weC85REfosD4D/GE/ZDg14OFW1fUvsaH2sMWQ3WU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715708345; c=relaxed/simple; bh=/9A7UTd7MM9F162NMDRSPFTTgx/ChKayAwWTGhRscw8=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=m3XEKIwyPk/R48cRes6+MUeQVNOGqjn0vq/meN1+BuVmWOpNdScQKcNfOlsGzXkenyhow1TrdzJWRoqHbni1EGktgu0HQoc6XCbv2cJf3s+KdglShJIgx9L6C0usS8anDEJjKfSuXoRLztpzHArNlEDD7BknUgaw98UP3Ko1IFI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=k11JKdhY; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44EFfnZ9022109; Tue, 14 May 2024 17:38:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=s380DvIVUvrqNkCPvWQHywF6rq8I55TzcUuDNMTmk7A=; b=k11JKdhYJkXi0FlErdzjhCBQ1bHqwdHmRof8d50Q8Tl1v4TuaQWENszEj/alcX+X6562 btV3Rxoplz78bJv17ISs6fG5d5DUBVm3GbqhQny1lbCsV2rNxPQYt0v9xKoV0keS+rjc jM7pIcGU2tZXKKJxgAFSx/tCAyQM0kveCvkktdxzbmp0jFcr9AdR9q0d8m6hDRuK0EVq DnK27RHAkKqeEMS3V4E7GfCbk3I2pLu+zsOqm/DJ/89xFKcak1XJbmSVFcS+J7SAi3HQ LiBO1oIG5IBaeQ+GtCJMhFKtiqjmc4LbgTKWA7fXx4l+T9xDIDrqtAqImiszOe0N+LEi LQ== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3y4a9brbdu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 May 2024 17:38:44 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 44EFOu8S002288; Tue, 14 May 2024 17:38:43 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3y2m0p6r78-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 May 2024 17:38:43 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 44EHcePx25362850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 May 2024 17:38:42 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 47E9758052; Tue, 14 May 2024 17:38:40 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E7F0D5805D; Tue, 14 May 2024 17:38:39 +0000 (GMT) Received: from ltcden12-lp3.aus.stglabs.ibm.com (unknown [9.40.195.53]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 14 May 2024 17:38:39 +0000 (GMT) From: Danny Tsen To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, leitao@debian.org, nayna@linux.ibm.com, appro@cryptogams.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au, ltcgcw@linux.vnet.ibm.com, dtsen@us.ibm.com, Danny Tsen Subject: [PATCH 0/3] crypto: X25519 supports for ppc64le Date: Tue, 14 May 2024 13:38:32 -0400 Message-Id: <20240514173835.4814-1-dtsen@linux.ibm.com> X-Mailer: git-send-email 2.31.1 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: O4MzfgNaX7KpN4B9YAgFpEOV1qf4shVt X-Proofpoint-GUID: O4MzfgNaX7KpN4B9YAgFpEOV1qf4shVt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-14_10,2024-05-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1011 priorityscore=1501 mlxscore=0 mlxlogscore=663 malwarescore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405140124 This patch series provide X25519 support for ppc64le with a new module curve25519-ppc64le. The implementation is based on CRYPTOGAMs perl output from x25519-ppc64.pl. Modified and added 3 supporting functions. This patch has passed the selftest by running modprobe curve25519-ppc64le. Danny Tsen (3): X25519 low-level primitives for ppc64le. X25519 core functions to handle scalar multiplication for ppc64le. Update Kconfig and Makefile. arch/powerpc/crypto/Kconfig | 11 + arch/powerpc/crypto/Makefile | 2 + arch/powerpc/crypto/curve25519-ppc64le-core.c | 299 ++++++++ arch/powerpc/crypto/curve25519-ppc64le_asm.S | 648 ++++++++++++++++++ 4 files changed, 960 insertions(+) create mode 100644 arch/powerpc/crypto/curve25519-ppc64le-core.c create mode 100644 arch/powerpc/crypto/curve25519-ppc64le_asm.S -- 2.31.1