Re: x86_64 gcm

2023-04-07 Thread Niels Möller
Maamoun TK writes: > Thank you for merging the patch. There is a very tiny change that keeps > itching me since I submitted the patch, the following PR > https://git.lysator.liu.se/nettle/nettle/-/merge_requests/59 would scratch > that itch. Merged. /Niels -- Niels Möller. PGP key

Re: x86_64 gcm

2023-04-03 Thread Maamoun TK
On Mon, Apr 3, 2023 at 7:37 AM Niels Möller wrote: > Maamoun TK writes: > > > I updated the GHASH implementation for x86_64 architecture to use 2-way > > block processing, it seems to me from Agner Fog's instruction tables that > > this change makes sense starting from Broadwell arch for intel

Re: x86_64 gcm

2023-04-02 Thread Niels Möller
Maamoun TK writes: > I updated the GHASH implementation for x86_64 architecture to use 2-way > block processing, it seems to me from Agner Fog's instruction tables that > this change makes sense starting from Broadwell arch for intel processors > while it has zero improvement on zen3/zen4

Re: x86_64 gcm

2023-03-23 Thread Maamoun TK
re options and fat setup still missing. > > Regards, > /Niels > > C x86_64/gcm-hash.asm > > ifelse(` >Copyright (C) 2022 Niels Möller > >This file is part of GNU Nettle. > >GNU Nettle is free software: you can redistribute it and/or >modify i

Re: gcm/ghash organization (was Re: x86_64 gcm)

2022-03-21 Thread Niels Möller
Maamoun TK writes: >> I've done the needed changes for the C, the x86_64, arm64 and powerpc64 >> implementations. s390x code also needs update, I hope to get to that in >> a few days (unless someone else wants to do that). > > I handled the s390x part and pushed a MR for changes. I've now

Re: gcm/ghash organization (was Re: x86_64 gcm)

2022-02-23 Thread Maamoun TK
On Tue, Feb 22, 2022 at 9:55 PM Niels Möller wrote: > ni...@lysator.liu.se (Niels Möller) writes: > > > I'm considering reorganizing the internal gcm functions. I think I'd > > like to have > > > > void > > _nettle_ghash_set_key (struct gcm_key *gcm, const union nettle_block16 > *key); > > >

Re: gcm/ghash organization (was Re: x86_64 gcm)

2022-02-22 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > I'm considering reorganizing the internal gcm functions. I think I'd > like to have > > void > _nettle_ghash_set_key (struct gcm_key *gcm, const union nettle_block16 > *key); > > which sets the key (typically, the key block is zero encrypte using

gcm/ghash organization (was Re: x86_64 gcm)

2022-02-16 Thread Niels Möller
ni...@lysator.liu.se (Niels Möller) writes: > I've written a first version of a gcm_hash for x86_64, using the > pclmulqdq (carryless mul) instructions. With only a single block at a time, > no interleaving, this gives to 4.3 GByte/s, I've added proper config and fat setup and merged this. It

x86_64 gcm

2022-02-12 Thread Niels Möller
per cycle, by interleaving, we could perhaps increase performance by another factor of two. See below. Configure options and fat setup still missing. Regards, /Niels C x86_64/gcm-hash.asm ifelse(` Copyright (C) 2022 Niels Möller This file is part of GNU Nettle. GNU Nettle is free