Re: [PATCH 0/2] Add optimized powerpc64 assembly for SHA2

2024-03-28 Thread Niels Möller
Eric Richter writes: > This set introduces an optimized powerpc64 assembly implementation for > SHA256 and SHA512. This have been derived from BSD-2-Clause licensed > code authored by IBM, originally released in the IBM POWER > Cryptography Reference Implementation project[1], modified to work

Re: Naming for names in struct nettle_hash

2024-03-28 Thread Niels Möller
Niels Möller writes: > Hi, I've got a bug report that sha512_224 and sha512_256 are missing in > the list returned by nettle_get_hashes, and I'm about to add them. > > But then there's a question of naming convention. Currently, the > > extern const struct nettle_hash nettle_sha512_256; > >

Re: additional API for SHAKE streaming read

2024-03-28 Thread Niels Möller
Daiki Ueno writes: > Yes, that looks good to me, except _nettle_sha3_shake has a > copy-and-paste error where SHA3_256_BLOCK_SIZE is hard-coded. Thanks, good catch. >> 1. Decide what should be renamed sha3_shake256_* > > I guess we can live with the existing interface. For SHAKE128, we could

[PATCH 1/2] powerpc64: Add optimized assembly for sha256-compress-n

2024-03-28 Thread Eric Richter
This patch introduces an optimized powerpc64 assembly implementation for sha256-compress-n. This takes advantage of the vshasigma instruction, as well as unrolling loops to best take advantage of running instructions in parallel. The following data was captured on a POWER 10 LPAR @ ~3.896GHz

[PATCH 0/2] Add optimized powerpc64 assembly for SHA2

2024-03-28 Thread Eric Richter
This set introduces an optimized powerpc64 assembly implementation for SHA256 and SHA512. This have been derived from BSD-2-Clause licensed code authored by IBM, originally released in the IBM POWER Cryptography Reference Implementation project[1], modified to work in Nettle, contributed under the

[PATCH 2/2] powerpc64: Add optimized assembly for sha512-compress-n

2024-03-28 Thread Eric Richter
This patch introduces an optimized powerpc64 assembly implementation for sha512-compress, derived from the implementation for sha256-compress-n. The following data was captured on a POWER 10 LPAR @ ~3.896GHz Current C implementation: Algorithm mode Mbyte/s sha512

Re: additional API for SHAKE streaming read

2024-03-28 Thread Daiki Ueno
Niels Möller writes: > Niels Möller writes: > >> I'll try to clean up and post or commit some of my changes, I'm sorry >> that will cause some conflicts. > > I've pushed my changes to a branch sha3-shake-updates, does that look > reasonable to you? If so, I think the next steps are Yes, that