[Zvk Code Samples] Fix mask logic of GHASH-via-Zvbc (#338)
As discovered by @shakakao and reported by @nibrunieAtSi5 (see https://github.com/riscv/riscv-crypto/issues/331), the Zvbc-based GHASH logic incorrectly relies on vxor to leave masked-off lanes undisturbed even though it sets the vector state with a mask agnostic policy. The fix is to use ", mu" to request masked-off elements to be undisturbed. I did check all proof-of-concept tests in an environment where masked-off elements get overwritten when "ma" is in effect. Prior to those fixes only the 'aes-gcm-test' fails, and all pass with those fixes. Fixes: https://github.com/riscv/riscv-crypto/issues/331 Signed-off-by:Eric Gouriou <ego@rivosinc.com>
parent
e2ba7f61
Please register or sign in to comment