BN_mod_inverse(3) OpenSSL BN_mod_inverse(3) NNAAMMEE BN_mod_inverse - compute inverse modulo n SSYYNNOOPPSSIISS #include BIGNUM *BN_mod_inverse(BIGNUM *r, BIGNUM *a, const BIGNUM *n, BN_CTX *ctx); DDEESSCCRRIIPPTTIIOONN _B_N___m_o_d___i_n_v_e_r_s_e_(_) computes the inverse of aa modulo nn places the result in rr ("(a*r)%n==1"). If rr is NULL, a new BBIIGGNNUUMM is created. ccttxx is a previously allocated BBNN__CCTTXX used for temporary variables. rr may be the same BBIIGGNNUUMM as aa or nn. RREETTUURRNN VVAALLUUEESS _B_N___m_o_d___i_n_v_e_r_s_e_(_) returns the BBIIGGNNUUMM containing the inverse, and NULL on error. The error codes can be obtained by _E_R_R___g_e_t___e_r_r_o_r(3). SSEEEE AALLSSOO _b_n(3), _E_R_R___g_e_t___e_r_r_o_r(3), _B_N___a_d_d(3) HHIISSTTOORRYY _B_N___m_o_d___i_n_v_e_r_s_e_(_) is available in all versions of SSLeay and OpenSSL. 1.0.2u 2019-12-20 BN_mod_inverse(3)