Skip to content

Commit c442915

Browse files
nickolaevt8m
authored andcommitted
Workaround for RSA on AArch64 Big Endian
1064616 introduced and optimized RSA NEON implementation for AArch64 architecture, namely Cortex-A72 and Neoverse N1. This implementation is broken in Big Endian mode, which is not widely used, therefore not properly verified. Here we disable this optimized implementation when Big Endian platform is used. Fixes: openssl#22687 CLA: trivial Signed-off-by: Nikolay Nikolaev <[email protected]> Reviewed-by: Tom Cosgrove <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> (Merged from openssl#26257) (cherry picked from commit b26894e)
1 parent f5aa0fa commit c442915

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crypto/bn/asm/armv8-mont.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,12 @@
8585
cmp $num,#32
8686
b.le .Lscalar_impl
8787
#ifndef __KERNEL__
88+
#ifndef __AARCH64EB__
8889
adrp x17,OPENSSL_armv8_rsa_neonized
8990
ldr w17,[x17,#:lo12:OPENSSL_armv8_rsa_neonized]
9091
cbnz w17, bn_mul8x_mont_neon
9192
#endif
93+
#endif
9294
9395
.Lscalar_impl:
9496
tst $num,#7

0 commit comments

Comments
 (0)