lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <36AECE24-69F7-4A95-A9C5-E1EFBE05DE9B@sifive.com>
Date: Fri, 12 Apr 2024 16:07:26 +0800
From: Jerry Shih <jerry.shih@...ive.com>
To: Yangyu Chen <cyy@...self.name>
Cc: Eric Biggers <ebiggers@...nel.org>,
 Andy Chiu <andy.chiu@...ive.com>,
 Albert Ou <aou@...s.berkeley.edu>,
 ardb@...nel.org,
 christoph.muellner@...ll.eu,
 heiko@...ech.de,
 hongrong.hsu@...ive.com,
 linux-crypto@...r.kernel.org,
 linux-kernel@...r.kernel.org,
 linux-riscv@...ts.infradead.org,
 palmer@...belt.com,
 paul.walmsley@...ive.com,
 phoebe.chen@...ive.com
Subject: Re: [PATCH v3 05/10] crypto: riscv - add vector crypto accelerated
 ChaCha20

On Apr 12, 2024, at 15:59, Yangyu Chen <cyy@...self.name> wrote:
> On 2024/1/22 08:19, Eric Biggers wrote:> From: Jerry Shih <jerry.shih@...ive.com>
>> 
>> Add an implementation of ChaCha20 using the Zvkb extension.  The
>> assembly code is derived from OpenSSL code (openssl/openssl#21923) that
>> was dual-licensed so that it could be reused in the kernel.
>> Nevertheless, the assembly has been significantly reworked for
>> integration with the kernel, for example by using a regular .S file
>> instead of the so-called perlasm, using the assembler instead of bare
>> '.inst', and reducing code duplication.
>> 
>> Signed-off-by: Jerry Shih <jerry.shih@...ive.com>
>> Co-developed-by: Eric Biggers <ebiggers@...gle.com>
>> Signed-off-by: Eric Biggers <ebiggers@...gle.com>
>> ---
> 
> Hi, Jerry Shih and Eric Biggers,
> 
> Since this implementation is derived from OpenSSL, I have an issue on
> OpenSSL about this chacha20 implementation using Zvkb [1] and see a fixes
> PR by Jerry Shih [2].
> 
> I wonder will kernel need to port those fixes to handle the non-multiple
> block length of the chacha20 cipher? If yes, we should port it immediately
> to catch up with the v6.9 release if we can.
> 
> [1] https://github.com/openssl/openssl/issues/24070
> [2] https://github.com/openssl/openssl/pull/24097
> 
> Thanks,
> Yangyu Chen
> 

There is no non-multiple block size issue here. It's already handled by the gluing part.

https://github.com/torvalds/linux/blob/586b5dfb51b962c1b6c06495715e4c4f76a7fc5a/arch/riscv/crypto/chacha-riscv64-glue.c#L45-L53

-Jerry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ