@@ -161,23 +161,24 @@ void mld_poly_ntt(mld_poly *a)
161161 mld_assert_abs_bound (a -> coeffs , MLDSA_N , MLD_NTT_BOUND );
162162}
163163
164- #if !defined(MLD_USE_NATIVE_INTT )
165164MLD_INTERNAL_API
166165void mld_poly_invntt_tomont (mld_poly * a )
167166{
168167 mld_assert_abs_bound (a -> coeffs , MLDSA_N , MLDSA_Q );
168+ #if defined(MLD_USE_NATIVE_INTT )
169+ {
170+ int ret ;
171+ ret = mld_intt_native (a -> coeffs );
172+ if (ret == MLD_NATIVE_FUNC_SUCCESS )
173+ {
174+ mld_assert_abs_bound (a -> coeffs , MLDSA_N , MLD_INTT_BOUND );
175+ return ;
176+ }
177+ }
178+ #endif /* MLD_USE_NATIVE_INTT */
169179 mld_invntt_tomont (a -> coeffs );
170180 mld_assert_abs_bound (a -> coeffs , MLDSA_N , MLD_INTT_BOUND );
171181}
172- #else /* !MLD_USE_NATIVE_INTT */
173- MLD_INTERNAL_API
174- void mld_poly_invntt_tomont (mld_poly * a )
175- {
176- mld_assert_abs_bound (a -> coeffs , MLDSA_N , MLDSA_Q );
177- mld_intt_native (a -> coeffs );
178- mld_assert_abs_bound (a -> coeffs , MLDSA_N , MLD_INTT_BOUND );
179- }
180- #endif /* MLD_USE_NATIVE_INTT */
181182
182183MLD_INTERNAL_API
183184void mld_poly_pointwise_montgomery (mld_poly * c , const mld_poly * a ,
0 commit comments