Change BN_mod_sqrt() so that it verifies that the input value is