[#BN_from_montgomery]
= BN&lowbar;from&lowbar;montgomery
:mrdocs:

Convert `a` from Montgomery representation to a normal residue modulo mont&hyphen;&gt;N&period;

== Synopsis

Declared in `&lt;openssl&sol;bn&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BN&lowbar;from&lowbar;montgomery(
    xref:BIGNUM.adoc[BIGNUM]* r,
    xref:BIGNUM.adoc[BIGNUM] const* a,
    xref:BN_MONT_CTX.adoc[BN&lowbar;MONT&lowbar;CTX]* mont,
    xref:BN_CTX.adoc[BN&lowbar;CTX]* ctx);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *r*
| Destination for the converted value&period;
| *a*
| Value in Montgomery form&period;
| *mont*
| Montgomery context from BN&lowbar;MONT&lowbar;CTX&lowbar;set()&period;
| *ctx*
| BN&lowbar;CTX scratch space&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
