[PATCH] rijndael-riscv-zvkned: fix m4 grouping when VLEN greater than 128

Jussi Kivilinna jussi.kivilinna at iki.fi
Thu May 7 06:28:18 CEST 2026


Hello,

On 07/05/2026 05:30, Michael Neuling wrote:
> Jussi,
> 
>> Implementation was making wrong assumptions about m4 grouping with
>> different VLEN configurations. Implementation did work with VLEN=128
>> but broke apart with VLEN=256, etc when VLEN>128. This commit switches
>> riscv-zvkned to use vslideup/vslidedown for setting up m4 vector group
>> with 4x128-bits data from four vectors with 128-bits of data.
>>
>> Tested with "qemu-riscv64 -cpu max,vlen={128, 256, 512, 1024}".
>>
>> Reported-by: Michael Neuling <mikey at neuling.org>
>> Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
> 
> Tested-by: Michael Neuling <mikey at neuling.org>
> 
> This works here. Thanks for the quick turnaround.
> 
> Mikey

Thanks to reporting and testing. I've added different vlen variants to
my qemu-riscv64 CI runs and this kind of bug should not pass anymore.

-Jussi



More information about the Gcrypt-devel mailing list