The factor_size/modulus_bitsize are required to be 1024/1536/2048.
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25751)
AMM amm = NULL;
int avx512ifma = !!ossl_rsaz_avx512ifma_eligible();
- if (factor_size % 512)
+ if (factor_size != 1024 && factor_size != 1536 && factor_size != 2048)
goto err;
amm = ossl_rsaz_amm52_x1[(factor_size / 512 - 2) * 2 + avx512ifma];
*/
# define DAMS(r,a,m,k0) damm((r),(a),(a),(m),(k0))
- if (modulus_bitsize % 512)
+ if (modulus_bitsize != 1024 && modulus_bitsize != 1536 && modulus_bitsize != 2048)
goto err;
damm = ossl_rsaz_amm52_x2[(modulus_bitsize / 512 - 2) * 2 + avx512ifma];