Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ BN_mod_inverse(3) — Tru64 UNIX 5.1b

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

bn(3)

err(3)

BN_add(3)

BN_mod_inverse(3)  —  Subroutines

NAME

BN_mod_inverse − Compute inverse modulo n

SYNOPSIS

#include <openssl/bn.h>
BIGNUM ∗BN_mod_inverse(
        BIGNUM ∗r, BIGNUM ∗a, const BIGNUM ∗n, BN_CTX ∗ctx );

DESCRIPTION

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. 

RETURN VALUES

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(). 

HISTORY

The BN_mod_inverse() function is available in all versions of SSLeay and OpenSSL. 

SEE ALSO

Functions: bn(3), err(3), BN_add(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026