Use BN_nist_mod_func to avoid need to peek error queue.