Re: [Aarch64] Optimize SHA1 Compress

2021-06-01 Thread Maamoun TK
On Tue, Jun 1, 2021 at 8:02 PM Niels Möller wrote: > Maamoun TK writes: > If I > read the latest patch correctly, you also don't keep any state besides > the MSGx registers? > Right, everything is done in the same context of each round in the latest patch, nothing kept beyond or after. > >

Re: [Aarch64] Optimize SHA1 Compress

2021-06-01 Thread Niels Möller
Maamoun TK writes: >> Great speedup! Any idea why openssl is still slightly faster? >> > > Sure, OpenSSL implementation uses a loop inside SH1 update function which > eliminates the constant initialization and state loading/sotring for each > block while nettle does that for every block

Re: [Aarch64] Optimize SHA1 Compress

2021-05-23 Thread Maamoun TK
On Sun, May 23, 2021 at 10:52 AM Niels Möller wrote: > Maamoun TK writes: > > > This patch optimizes SHA1 compress function for arm64 architecture by > > taking advantage of SHA-1 instructions of Armv8 crypto extension. > > The SHA-1 instructions: > > SHA1C: SHA1 hash update (choose) > > SHA1H:

Re: [Aarch64] Optimize SHA1 Compress

2021-05-23 Thread Niels Möller
Maamoun TK writes: Looks pretty good. A few comments and questions below. > This patch optimizes SHA1 compress function for arm64 architecture by > taking advantage of SHA-1 instructions of Armv8 crypto extension. > The SHA-1 instructions: > SHA1C: SHA1 hash update (choose) > SHA1H: SHA1 fixed

Re: [Aarch64] Optimize SHA1 Compress

2021-05-20 Thread Maamoun TK
I've mentioned it in the README file. --- arm64/README | 7 +++ arm64/crypto/sha1-compress.asm | 6 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arm64/README b/arm64/README index d2745d57..206bb773 100644 --- a/arm64/README +++ b/arm64/README @@

Re: [Aarch64] Optimize SHA1 Compress

2021-05-20 Thread Maamoun TK
On Thu, May 20, 2021 at 9:16 PM Niels Möller wrote: > Maamoun TK writes: > > > I've written the patch from scratch while keeping in mind how to use the > > SHA-1 instructions of Arm64 crypto extension from sha1-arm.c in Jeffrey's > > repository. > > If that is the case, avoid phrases like

Re: [Aarch64] Optimize SHA1 Compress

2021-05-20 Thread Niels Möller
Maamoun TK writes: > I've written the patch from scratch while keeping in mind how to use the > SHA-1 instructions of Arm64 crypto extension from sha1-arm.c in Jeffrey's > repository. If that is the case, avoid phrases like "based on" which are easily misread as implying it's a derived work in

Re: [Aarch64] Optimize SHA1 Compress

2021-05-14 Thread Maamoun TK
On Fri, May 14, 2021 at 3:42 PM Simo Sorce wrote: > you added the standard GNU License to these files, but the repository > you mention has no license at all (red flag), and looking at the code > it points to on which these files are "based" the current license if > ASL 2.0 > > How much are your

Re: [Aarch64] Optimize SHA1 Compress

2021-05-14 Thread Simo Sorce
Hi Maamoun, you added the standard GNU License to these files, but the repository you mention has no license at all (red flag), and looking at the code it points to on which these files are "based" the current license if ASL 2.0 How much are your patches "based" on the SHA-Intrinsic source? The

[Aarch64] Optimize SHA1 Compress

2021-05-13 Thread Maamoun TK
This patch optimizes SHA1 compress function for arm64 architecture by taking advantage of SHA-1 instructions of Armv8 crypto extension. The SHA-1 instructions: SHA1C: SHA1 hash update (choose) SHA1H: SHA1 fixed rotate SHA1M: SHA1 hash update (majority) SHA1P: SHA1 hash update (parity) SHA1SU0: