Skip to content

Commit

Permalink
Workaround for RSA on AArch64 Big Endian
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
nickolaev authored and t8m committed Jan 15, 2025
1 parent 0b1d3eb commit b26894e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/bn/asm/armv8-mont.pl
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@
cmp $num,#32
b.le .Lscalar_impl
#ifndef __KERNEL__
#ifndef __AARCH64EB__
adrp x17,OPENSSL_armv8_rsa_neonized
ldr w17,[x17,#:lo12:OPENSSL_armv8_rsa_neonized]
cbnz w17, bn_mul8x_mont_neon
#endif
#endif
.Lscalar_impl:
tst $num,#7
Expand Down

0 comments on commit b26894e

Please sign in to comment.