NAME
BNmodinverse - compute inverse modulo n
SYNOPSIS
#include
BIGNUM *BNmodinverse(BIGNUM *r, BIGNUM *a, const BIGNUM *n, BNCTX *ctx);DESCRIPTION
BNmodinverse() computes the inverse of aa modulo nn places the resultin rr ("(a*r)%n==1"). If rr is NULL, a new BBIIGGNNUUMM is created.
ccttxx is a previously allocated BBNNCCTTXX used for temporary variables. rr may be the same BBIIGGNNUUMM as aa or nn.RETURN VALUES
BNmodinverse() returns the BBIIGGNNUUMM containing the inverse, and NULL on error. The error codes can be obtained by ERRgeterror(3).SEE ALSO
bn(3), ERRgeterror(3), BNadd(3) HISTORY BNmodinverse() is available in all versions of SSLeay and OpenSSL.0.9.7l 2002-09-25 BNmodinverse(3)