BN_X931_generate_Xpq

Generate random X9.31 parameters Xp and Xq of half the requested RSA bit length (deprecated).

Synopsis

Declared in <openssl/bn.h>

[[deprecated]]
int
BN_X931_generate_Xpq(
    BIGNUM* Xp,
    BIGNUM* Xq,
    int nbits,
    BN_CTX* ctx);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
XpDestination for the first random parameter (top bits set for the X9.31 range).
XqDestination for the second random parameter; |Xp - Xq| is forced above 2^(nbits/2 - 100).
nbitsTotal RSA modulus bit length (at least 1024 and a multiple of 256).
ctxBN_CTX for temporaries and private RNG.