DO NOT MERGE
Always use Fermat's Little Theorem in ecdsa_sign_setup.

The case where ec_group_get_mont_data is NULL is only for arbitrary groups
which we now require to be prime order. BN_mod_exp_mont is fine with a NULL
BN_MONT_CTX. It will just compute it. Saves a bit of special-casing.

Also don't mark p-2 as BN_FLG_CONSTTIME as the exponent is public anyway.

(cherry picked from commit 8cf79af7d1497c07bd684764b96c9659e7b32ae1)

Bug: 33752052
Change-Id: Ia57cf8b68415742233b5c70e9da901b0f2954e7a
(cherry picked from commit c5f118738a61b533d90b01841664e6480e0692fe)
2 files changed