RFR: 8365732: RISC-V: implement AES CTR intrinsics [v11]
    Andrew Haley 
    aph at openjdk.org
       
    Mon Oct 20 08:47:04 UTC 2025
    
    
  
On Fri, 12 Sep 2025 08:08:53 GMT, Anjian Wen <wenanjian at openjdk.org> wrote:
>> Thanks for the review. I'm still developing it.
>> Regarding the growth of the counter array, it should use 8 bytes to store the count.  I use 4 Byte here according to OpenSSL aes-ctr code, I will try to fix it later
>> https://github.com/openssl/openssl/blob/master/crypto/aes/asm/aes-riscv64-zvkb-zvkned.pl#L242
>
>> Are you sure this is correct? See `com.sun.crypto.provider.CounterMode::increment`.
> 
> Hi @theRealAph , according to your advice and code from `com.sun.crypto.provider.CounterMode::increment`,  I have modified my patch about counter increase by increasing 2 8Byte. Most of case increasing the first 8 Byte(from 8bit to 15 bit) is enough, it only needs to increase the next 8Byte when the first 8Byte overflows. And I have added a test for limit case, could you please help review again?
Your encryption operations should run in constant time.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25281#discussion_r2444214586
    
    
More information about the hotspot-compiler-dev
mailing list