RFR: JDK-8216437 : PPC64: Add intrinsic for GHASH algorithm [v6]
Andrew Haley
aph at openjdk.org
Fri Jan 10 13:10:48 UTC 2025
On Thu, 9 Jan 2025 09:07:21 GMT, Suchismith Roy <sroy at openjdk.org> wrote:
>> JBS Issue : [JDK-8216437](https://bugs.openjdk.org/browse/JDK-8216437)
>>
>> Currently acceleration code for GHASH is missing for PPC64.
>>
>> The current implementation utlilises SIMD instructions on Power and uses Karatsuba multiplication for obtaining the final result.
>
> Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision:
>
> restore
The commenting here is poor.
GHASH uses little-endian for the byte order, but big-endian for the bit order. For example, the polynomial 1 is represented as the 16-byte string 80 00 00 00 | 12 bytes of 00. So, we must either reverse the bytes in each word and do everything big-endian or reverse the bits in each byte and do it little-endian. Which do you do?
Sure, I could figure it out by reading the code, but please say.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20235#issuecomment-2582675700
More information about the hotspot-dev
mailing list