From patchwork Thu Feb 29 17:36:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladis Dronov X-Patchwork-Id: 208456 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp578656dyb; Thu, 29 Feb 2024 10:02:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWQ2+uha00/zefKFMzS6v8+YTZfnZtVUr66TxarLYYYdBbo7XRfG8vwIF6oey3u84dLcSVgqdEC/5KM0rEqF6Sncjv/ww== X-Google-Smtp-Source: AGHT+IFhfeO6E7bPXwSNMXUvYORJWkV96xP2U7YA+FLBuJ9MXil8FwPF/8Hq9eM3DtLAM4KdH4TM X-Received: by 2002:a17:902:d50a:b0:1dc:b968:780e with SMTP id b10-20020a170902d50a00b001dcb968780emr4055758plg.33.1709229756133; Thu, 29 Feb 2024 10:02:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709229756; cv=pass; d=google.com; s=arc-20160816; b=JWCwxjNIiPhoLgQBuFnJcWO0l0XAalfyUfWaaUrLwZg83aU4fIzSUu2C69F4sQQtQ5 YPQRnOU2cPRcNkqxWZu3SF07FLpCWOr9AMHkXtTPA1ubAsQLzGrgRv+psohl1bX/6Pcd d3K3YeKKrAYPR8lgqK0PU9WgI7BfBoVtUhVQ3h2TIGRlPYbP2kvq5bRJIhVDETgGaeSw 1+Jw+TsxrPIS7J1mlB5aIVqVOKvcSXleGnPb/46BgOh5NBkKZWzPhvjhDwP1EAv6X0En EZ1XNKxG75rbr3zzDe6R7PSu9P1GrXxnh6eL0kW8hWNpKtijVc95suVOYx72Ph5eK1f1 sTWw== 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=8NCFY5/xqwqZ+BzOYm6QBuVWVdJZDIeZ/gZcGzEqZ/8=; fh=tMWC+qvzhpfUrp4PDEJDlKp8xKkkkxzuO8sOeiVou/s=; b=qOgkhxefGl3HlXEVD4q9AXdOW9+fv4nlINRm8rXKIRuXtrQjMVoBN1xQubK0PTvLW8 tddpDlBwKJba8UeUTVX2NXukXBTAIhkLqkyw24f8cIR/A2psEFhzVNqnriPBWu/WC11H 05nIwkZGv6Nw9YYCfx/abKZXuYhGw5TBscXMpKZT5axRZugTs0mayZo5qMwRLJND2oYd J55u/H1drdQcKLndmZa2OAAzrOjs/nrwiURp+RhvrX4zrwPv3/AZJxTYzNRYgQtkYYle 5ZP0/k2DqSY8Ku3yG0KSWP7uWpxMyJYOHiE7nr78ipwYcIyXmzf6BIoiJhsP4LrQlpYX Fa6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fB+l7Dtw; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-87185-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87185-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b1-20020a170902d50100b001d93327867bsi1808908plg.286.2024.02.29.10.02.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 10:02:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87185-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fB+l7Dtw; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-87185-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87185-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 4B313B25F13 for ; Thu, 29 Feb 2024 17:37:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C292578292; Thu, 29 Feb 2024 17:36:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fB+l7Dtw" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 272257828A for ; Thu, 29 Feb 2024 17:36:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709228191; cv=none; b=ZT+1kS0QZVK4MRyYZRGRXTFAX9iL4p2D+eNKSqssP9PFVf9poM4xhXkUFl7APdUzmDis11Nvpu2Wjl8BD0GYWgcpv4waNz0uLCo6r/JuUZlwmJjNGLjFyjFkSL2FN0nhOO0Ab1WsmOClNIWsUUBa7vVBnOg1DLa6stUb5mcfZV0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709228191; c=relaxed/simple; bh=Nfy+FvhiVO6FRr4RGFIgCjBGC56X8Ck24EWdzRnn+CA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-type; b=cpn+RNcG2b0GiV9p+qa42CqnHXV3iDQYvNBzI+xBExvTNlLGkXoCXSrXfNPGcN7qcgo/l+hFCCskBggByytqAabCNnXX0b2KHqD5CTNYWOw+ELprjpPwSCcKIdZ4MgsGLxZUGnUVmJGfn1bzTATAPZaHajStCc8IcTGqIWOd4eE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=fB+l7Dtw; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709228189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8NCFY5/xqwqZ+BzOYm6QBuVWVdJZDIeZ/gZcGzEqZ/8=; b=fB+l7DtwHuxqvbKXkzdZ/O45ea4GwhPX3XeG4SK/sUAWl1ljqcdaPG6NRvlUBq/GkSESSd tm0l1FVtggYXQavXulHSavkZxHBBQS+l6IsxHfXXnA4aUVKvFFB2gK5A/tuKX+0oM5PY0B 3enVrGbDGuqTCOr7UKfExfZrVHEbDM4= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-FaAciST9MoWocjVqHzlTlg-1; Thu, 29 Feb 2024 12:36:25 -0500 X-MC-Unique: FaAciST9MoWocjVqHzlTlg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C8701C0CCA5; Thu, 29 Feb 2024 17:36:25 +0000 (UTC) Received: from rules.brq.redhat.com (unknown [10.45.242.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C6B220229A4; Thu, 29 Feb 2024 17:36:23 +0000 (UTC) From: Vladis Dronov To: Herbert Xu , "David S . Miller" Cc: Nicolai Stange , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Vladis Dronov Subject: [PATCH] crypto: tcrypt - add ffdhe2048(dh) test Date: Thu, 29 Feb 2024 18:36:03 +0100 Message-ID: <20240229173603.10258-1-vdronov@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792257300711509685 X-GMAIL-MSGID: 1792257300711509685 Commit 7dce59819750 ("crypto: dh - implement ffdheXYZ(dh) templates") implemented the said templates. Add ffdhe2048(dh) test as it is the fastest one. This is a requirement for the FIPS certification. Signed-off-by: Vladis Dronov --- crypto/tcrypt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index ea4d1cea9c06..8aea416f6480 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -1851,6 +1851,9 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb) ret = min(ret, tcrypt_test("cbc(aria)")); ret = min(ret, tcrypt_test("ctr(aria)")); break; + case 193: + ret = min(ret, tcrypt_test("ffdhe2048(dh)")); + break; case 200: test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, speed_template_16_24_32);