Creates an IDLC parameters object from the given IDLC domain parameter values.
#include "huidlc.h"
int hu_IDLCDHParamsSet(size_t pSize, size_t qSize, size_t pLength, const unsigned char *p, size_t gLength, const unsigned char *g, size_t qLength, const unsigned char *q, sb_RNGCtx rngCtx, sb_YieldCtx yieldCtx, sb_Params *idlcParams, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
The length (in bits) of the prime modulus p. The length must be greater than or equal to 512.
The length (in bits) of the prime divisor q, if using. Otherwise, the length (in bits) of the private keys.
The length (in bytes) of the prime modulus.
Prime modulus.
The length (in bytes) of the generator. Must be less than or equal to pLength.
Generator of order q.
The length (in bytes) of the prime divisor. (Optional)
Prime divisor of p-1. (Optional)
An RNG context. (Optional - set to NULL if key generation will not be performed.)
A yield context. (Optional - set to NULL if yielding is not required.)
The IDLC parameters object pointer.
A global context.
This IDLC parameter object can be used for DH.
An RNG context and/or yielding context must be supplied if key generation and/or yielding will be performed, respectively.
The values should satisfy the following properties: p and q are prime, q is a divisor of (p-1), and g has order q modulo p. The bit length of prime p must be set in pSize and that of prime q in qSize.
q is optional. If q is not supplied, then qSize specifies the size of private keys to be used with these parameters. In this case, if qSize is set to zero, the default size of 160 bits will be used.
The idlcParams object pointer is NULL.
The length of p and/or q is invalid.
The length of the p, q and/or g buffers is invalid.
Memory allocation failure.
Success.