|
BN_mod_inverse(3)
Contents
|
BN_mod_inverse - Compute inverse modulo n
#include <openssl/bn.h>
BIGNUM *BN_mod_inverse(
BIGNUM *r, BIGNUM *a, const BIGNUM *n, BN_CTX *ctx
);
The BN_mod_inverse() function computes the inverse of a
modulo n and places the result in r ((a*r)%n==1). If r is
NULL, a new BIGNUM is created.
The ctx is a previously allocated BN_CTX used for temporary
variables. The r value may be the same BIGNUM as a or
n.
The BN_mod_inverse() function returns the BIGNUM containing
the inverse, and NULL on error. The error codes can be
obtained by using ERR_get_error().
The BN_mod_inverse() function is available in all versions
of SSLeay and OpenSSL.
Functions: bn(3), err(3), BN_add(3)
BN_mod_inverse(3)
[ Back ] |