pub unsafe extern "C" fn Hacl_Bignum64_mod_inv_prime_vartime_precomp(
    k: *mut Hacl_Bignum_MontArithmetic_bn_mont_ctx_u64,
    a: *mut u64,
    res: *mut u64
)
Expand description

Write a ^ (-1) mod n in res.

The argument a and the outparam res are meant to be len limbs in size, i.e. uint64_t[len]. The argument k is a montgomery context obtained through Hacl_Bignum64_mont_ctx_init.

Before calling this function, the caller will need to ensure that the following preconditions are observed. • n is a prime • 0 < a • a < n