[#BN_GF2m_mod_div]
= BN&lowbar;GF2m&lowbar;mod&lowbar;div
:mrdocs:

Compute r &equals; (a &sol; b) mod p for binary polynomial&hyphen;field (GF(2&circ;m)) values&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
BN&lowbar;GF2m&lowbar;mod&lowbar;div(
    xref:BIGNUM.adoc[BIGNUM]* r,
    xref:BIGNUM.adoc[BIGNUM] const* a,
    xref:BIGNUM.adoc[BIGNUM] const* b,
    xref:BIGNUM.adoc[BIGNUM] const* p,
    xref:BN_CTX.adoc[BN&lowbar;CTX]* ctx);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *r*
| Result BIGNUM&period;
| *a*
| Dividend&period;
| *b*
| Divisor (must be invertible modulo `p)&period;`
| *p*
| Irreducible reduction polynomial&period;
| *ctx*
| BN&lowbar;CTX for temporaries&period;
|===


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