RFR: 8334999: RISC-V: implement AES single block encryption/decryption intrinsics [v3]

Fei Yang fyang at openjdk.org
Thu Sep 19 08:36:41 UTC 2024


On Thu, 18 Jul 2024 08:26:02 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Changes requested by fyang (Reviewer).
>
>> As for comparison with the openssl version: first of all, thanks for the sources, @RealFYang! The main difference that I see is that they introduced three different different versions of encryption depending on the key sizes, which allows them to skip a couple of instructions, like when I did `vaesem_vv(res, vzero)` followed by `vxor_vv(res, res, vtemp1)`. So I thought it'll be more efficient to replace the current version by something openssl-lookalike. The only problem I see is increasing code size a bit. Please let me know if we are not interested in this change for some reason
> 
> Does `vaesz_vs` help in anyway? And what about the `generate_aescrypt_decryptBlock`?  [1]
> 
> [1] https://github.com/openssl/openssl/blob/master/crypto/aes/asm/aes-riscv64-zvkned.pl#L451

> @RealFYang following up on your questions. I would love to see this one go through as it promises some pretty significant gains on compatible hardware! Thanks again

Yeah, will take another look. Have you tried this on real hardware? Interesting to see the numbers.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19960#issuecomment-2360364773


More information about the hotspot-dev mailing list