[#BN_X931_derive_prime_ex]
= BN&lowbar;X931&lowbar;derive&lowbar;prime&lowbar;ex
:mrdocs:

Derive an X9&period;31 prime p from Xp&sol;Xp1&sol;Xp2 parameters (deprecated)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
BN&lowbar;X931&lowbar;derive&lowbar;prime&lowbar;ex(
    xref:BIGNUM.adoc[BIGNUM]* p,
    xref:BIGNUM.adoc[BIGNUM]* p1,
    xref:BIGNUM.adoc[BIGNUM]* p2,
    xref:BIGNUM.adoc[BIGNUM] const* Xp,
    xref:BIGNUM.adoc[BIGNUM] const* Xp1,
    xref:BIGNUM.adoc[BIGNUM] const* Xp2,
    xref:BIGNUM.adoc[BIGNUM] const* e,
    xref:BN_CTX.adoc[BN&lowbar;CTX]* ctx,
    xref:BN_GENCB.adoc[BN&lowbar;GENCB]* cb);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p*
| Destination for the derived prime&period;
| *p1*
| Optional destination for the first auxiliary prime, or NULL&period;
| *p2*
| Optional destination for the second auxiliary prime, or NULL&period;
| *Xp*
| Random parameter used to construct p&period;
| *Xp1*
| Random parameter used to construct p1&period;
| *Xp2*
| Random parameter used to construct p2&period;
| *e*
| Public exponent that must be coprime to p&hyphen;1&period;
| *ctx*
| BN&lowbar;CTX for temporaries&period;
| *cb*
| Optional generation callback, or NULL&period;
|===


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