Skip to content

Commit

Permalink
Fix big-endian Power10 chacha20 implementation
Browse files Browse the repository at this point in the history
Some of the BE specific permutes were incorrect. Fix them.

This passes all tests on a P10/ppc64 debian unstable host.

Fixes openssl#25451

CLA: trivial

Reviewed-by: Paul Dale <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#25483)
  • Loading branch information
pmur authored and t8m committed Sep 19, 2024
1 parent 27f20a4 commit daead12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crypto/chacha/asm/chachap10-ppc.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1032,10 +1032,10 @@ sub VSX_lane_ROUND_8x {
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
Expand Down

0 comments on commit daead12

Please sign in to comment.