[#BN_X931_generate_Xpq]
= BN&lowbar;X931&lowbar;generate&lowbar;Xpq
:mrdocs:

Generate random X9&period;31 parameters Xp and Xq of half the requested RSA bit length (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;generate&lowbar;Xpq(
    xref:BIGNUM.adoc[BIGNUM]* Xp,
    xref:BIGNUM.adoc[BIGNUM]* Xq,
    int nbits,
    xref:BN_CTX.adoc[BN&lowbar;CTX]* ctx);
----

[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
| *Xp*
| Destination for the first random parameter (top bits set for the X9&period;31 range)&period;
| *Xq*
| Destination for the second random parameter&semi; &verbar;Xp &hyphen; Xq&verbar; is forced above 2&circ;(nbits&sol;2 &hyphen; 100)&period;
| *nbits*
| Total RSA modulus bit length (at least 1024 and a multiple of 256)&period;
| *ctx*
| BN&lowbar;CTX for temporaries and private RNG&period;
|===


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