OpenSSL BN_mod_inverse(3openssl)
NNNNAAAAMMMMEEEEBN_mod_inverse - compute inverse modulo n
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS#include
BIGNUM *BN_mod_inverse(BIGNUM *r, BIGNUM *a, const BIGNUM *n,
BN_CTX *ctx);
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNBN_mod_inverse() computes the inverse of aaaa modulo nnnn places
the result in rrrr ((a*r)%n==1). If rrrr is NULL, a new BBBBIIIIGGGGNNNNUUUUMMMM is
created.ccccttttxxxx is a previously allocated BBBBNNNN_CCCCTTTTXXXX used for temporary
variables. rrrr may be the same BBBBIIIIGGGGNNNNUUUUMMMM as aaaa or nnnn. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSSBN_mod_inverse() returns the BBBBIIIIGGGGNNNNUUUUMMMM containing the inverse,
and NULL on error. The error codes can be obtained byERR_get_error(3).
SSSSEEEEEEEE AAAALLLLSSSSOOOObn(3), ERR_get_error(3), BN_add(3)
HHHHIIIISSSSTTTTOOOORRRRYYYYBN_mod_inverse() is available in all versions of SSLeay and
OpenSSL.25/Sep/2002 Last change: 0.9.8o 1