Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp774439iob; Fri, 13 May 2022 12:16:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUk7zUGU/eZ5/3hzs3TWhE1k8YdyoYF0U4Q6ZPg99aUp1nuSkz59ku749oSOh+kNvIHoa1 X-Received: by 2002:a05:6402:34ca:b0:427:c655:9dd6 with SMTP id w10-20020a05640234ca00b00427c6559dd6mr164394edc.372.1652469379118; Fri, 13 May 2022 12:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652469379; cv=none; d=google.com; s=arc-20160816; b=l2npjik5QWtiKtqaS9oU8qVPITdVMdimPnbNxEby0wdGcKV1XvKsKvUEWlwKEIbFgZ SKMqKr4H1vnSWPfjVRbB39C4xYoaCv7co1WAKDL/9IVSdkj3aO7wl1ClD2UxH2pCNjwW LtJKFKq8sAOM6m1uj5JQdJ2DxUfMSZKOxx9hofBa3H/CRw18u+Xsi7ac/AhphV92I+qh HCga4+oMNxfdmu8tMMcZRid0puvX2Hx1rRchuFd5TEJRB51stT/oqjj7fNygKaRkS7QM cqpA1M8jyi9mkViCJLes+xoO+duXVJuIO8J6EhGE6DF0HJe31LksVbtlAe0MkC5NBHO6 cZsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=CxdqDONwaT1lQ5/Uj3vq8TgkU3SgZm41JmEv+NgyyQY=; b=JqRN2LJi05saXVKL+GWSRvVZd4K2tSGQx30xoHifyEXhqtWdiKgi0ig3PPHsw1jhRI jD8L5k86SuN0wvRNhabi9bKSRlGGv1zT/vQ6suF8BD+dQFZ0fz9s2hlgz2fZcKroA2Ic HMvAGHG7OHb2e0mfrwHjzL9FzqcXiIWx5oBqOjm0aO9/4A8KhQvcRG9hsFUdToddzc/d I7k2+KSM8HAcku0XspOpbNnc0Dxd5XH80eOId2ITquQZJGg7ildbM4IVmQ8vkZ9pYeL/ gX1EubYJ7yXCeyruZaGpjx7ZhU8Mx1vfLWfRwccACeUa1oXs3LdAWImawa4SDq1NPlA6 1TVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr24-20020a1709073f9800b006f3a3c628c8si3032905ejc.781.2022.05.13.12.15.40; Fri, 13 May 2022 12:16:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378984AbiEMJgc (ORCPT + 99 others); Fri, 13 May 2022 05:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379131AbiEMJgY (ORCPT ); Fri, 13 May 2022 05:36:24 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C886147578; Fri, 13 May 2022 02:36:22 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1npRiY-00DHGI-J4; Fri, 13 May 2022 19:36:16 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 13 May 2022 17:36:14 +0800 Date: Fri, 13 May 2022 17:36:14 +0800 From: Herbert Xu To: Vladis Dronov Cc: Patrick Steuer , Harald Freudenberger , Heiko Carstens , "David S . Miller" , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-crypto@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] s390/crypto: add crypto library interface for ChaCha20 Message-ID: References: <20220508130944.17860-1-vdronoff@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220508130944.17860-1-vdronoff@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sun, May 08, 2022 at 03:09:44PM +0200, Vladis Dronov wrote: > From: Vladis Dronov > > Implement a crypto library interface for the s390-native ChaCha20 cipher > algorithm. This allows us to stop to select CRYPTO_CHACHA20 and instead > select CRYPTO_ARCH_HAVE_LIB_CHACHA. This allows BIG_KEYS=y not to build > a whole ChaCha20 crypto infrastructure as a built-in, but build a smaller > CRYPTO_LIB_CHACHA instead. > > Make CRYPTO_CHACHA_S390 config entry to look like similar ones on other > architectures. Remove CRYPTO_ALGAPI select as anyway it is selected by > CRYPTO_SKCIPHER. > > Add a new test module and a test script for ChaCha20 cipher and its > interfaces. Here are test results on an idle z15 machine: > > Data | Generic crypto TFM | s390 crypto TFM | s390 lib > size | enc dec | enc dec | enc dec > -----+--------------------+------------------+---------------- > 512b | 1545ns 1295ns | 604ns 446ns | 430ns 407ns > 4k | 9536ns 9463ns | 2329ns 2174ns | 2170ns 2154ns > 64k | 149.6us 149.3us | 34.4us 34.5us | 33.9us 33.1us > 6M | 23.61ms 23.11ms | 4223us 4160us | 3951us 4008us > 60M | 143.9ms 143.9ms | 33.5ms 33.2ms | 32.2ms 32.1ms > > Signed-off-by: Vladis Dronov > --- > arch/s390/crypto/chacha-glue.c | 34 +- > drivers/crypto/Kconfig | 4 +- > tools/testing/crypto/chacha20-s390/Makefile | 12 + > .../testing/crypto/chacha20-s390/run-tests.sh | 34 ++ > .../crypto/chacha20-s390/test-cipher.c | 372 ++++++++++++++++++ > 5 files changed, 452 insertions(+), 4 deletions(-) > create mode 100644 tools/testing/crypto/chacha20-s390/Makefile > create mode 100644 tools/testing/crypto/chacha20-s390/run-tests.sh > create mode 100644 tools/testing/crypto/chacha20-s390/test-cipher.c Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt