RFR: 8247645: ChaCha20 intrinsics [v2]
Jamil Nimeh
jnimeh at openjdk.org
Tue Nov 8 04:13:30 UTC 2022
On Mon, 7 Nov 2022 18:02:43 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> Jamil Nimeh has updated the pull request incrementally with six additional commits since the last revision:
>>
>> - Change intrinsic helper method name conform to convention
>> - consolidate chacha macroAssembler routines into chacha stubGenerator file
>> - More indentation fixes on aarch64
>> - rename chapoly->chacha for macro file
>> - rename chacha macro file to be consistent with x86_64 naming
>> - Fix indentation issues
>
> src/hotspot/cpu/x86/macroAssembler_x86.hpp line 989:
>
>> 987: bool multi_block);
>> 988:
>> 989: // ChaCha20-Poly1305 macroAssembler defs
>
> These methods can also be moved to `stubGenerator_x86_64.hpp`/`stubGenerator_x86_64_chacha.cpp`. There are no other usages besides x86-64-specific CC20 stub.
Done, and removed `macroAssembler_x86_chacha.cpp` since it is no longer needed.
> src/java.base/share/classes/com/sun/crypto/provider/ChaCha20Cipher.java line 870:
>
>> 868: */
>> 869: @IntrinsicCandidate
>> 870: private static int _chaCha20Block(int[] initState, byte[] result) {
>
> Seems like there are 2 major naming conventions for intrinsic helper methods: prepend "impl" (e.g, `CounterMode.implCrypt`) or append "0" (`GaloisCounterMode.implGCMCrypt0`). I'd prefer to see either one used here.
Done.
-------------
PR: https://git.openjdk.org/jdk/pull/7702
More information about the security-dev
mailing list