Skip to content

Commit e20c983

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 <nicknickolaev@gmail.com> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from openssl#26257) (cherry picked from commit b26894e)
1 parent d1a3c86 commit e20c983

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
@@ -84,10 +84,12 @@
8484
cmp $num,#32
8585
b.le .Lscalar_impl
8686
#ifndef __KERNEL__
87+
#ifndef __AARCH64EB__
8788
adrp x17,OPENSSL_armv8_rsa_neonized
8889
ldr w17,[x17,#:lo12:OPENSSL_armv8_rsa_neonized]
8990
cbnz w17, bn_mul8x_mont_neon
9091
#endif
92+
#endif
9193
9294
.Lscalar_impl:
9395
tst $num,#7

0 commit comments

Comments
 (0)