From 0e767cfe00909650136ceda17938f40a7bb7f080 Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Tue, 17 Sep 2024 15:22:58 +0000 Subject: [PATCH] Fix big-endian Power10 chacha20 implementation Some of the BE specific permutes were incorrect. Fix them. This passes all tests on a P10/ppc64 debian unstable host. Fixes #25451 CLA: trivial Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/25483) (cherry picked from commit daead12df04e2257bd5f2f8441a3c2965ef102ee) --- crypto/chacha/asm/chachap10-ppc.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/chacha/asm/chachap10-ppc.pl b/crypto/chacha/asm/chachap10-ppc.pl index ea4f3faf53d..a6bff8db38a 100755 --- a/crypto/chacha/asm/chachap10-ppc.pl +++ b/crypto/chacha/asm/chachap10-ppc.pl @@ -1032,10 +1032,10 @@ $code.=<<___; vadduwm $xcn0,$xcn4,@K[2] vadduwm $xdn0,$xdn4,@K[3] - be?vperm $xan0,$xa4,$xa4,$beperm - be?vperm $xbn0,$xb4,$xb4,$beperm - be?vperm $xcn0,$xcn4,$xcn4,$beperm - be?vperm $xdn0,$xdn4,$xdn4,$beperm + be?vperm $xan0,$xan0,$xan0,$beperm + be?vperm $xbn0,$xbn0,$xbn0,$beperm + be?vperm $xcn0,$xcn0,$xcn0,$beperm + be?vperm $xdn0,$xdn0,$xdn0,$beperm ${UCMP}i $len,0x40 blt Ltail_vsx_8x_1 -- 2.47.2