[#BN_mod_inverse] = BN_mod_inverse :mrdocs: Compute the modular inverse of `a` modulo `n.` == Synopsis Declared in `<openssl/bn.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BIGNUM.adoc[BIGNUM]* BN_mod_inverse( xref:BIGNUM.adoc[BIGNUM]* ret, xref:BIGNUM.adoc[BIGNUM] const* a, xref:BIGNUM.adoc[BIGNUM] const* n, xref:BN_CTX.adoc[BN_CTX]* ctx); ---- == Return Value Result BIGNUM (possibly newly allocated) on success, or NULL if no inverse exists / on error. == Parameters [cols="1,4"] |=== | Name| Description | *ret* | Existing BIGNUM to receive the result, or NULL to allocate. | *a* | Value to invert. | *n* | Modulus; must be non‐zero. | *ctx* | BN_CTX scratch space. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#