Creates an IDLC private and/or public key object from the given key value(s).
#include "huidlc.h"
int hu_IDLCKeySet(sb_Params idlcParams, size_t privateKeyLen, const unsigned char *privateKeyValue, size_t publicKeyLen, const unsigned char *publicKeyValue, sb_PrivateKey *privateKey, sb_PublicKey *publicKey, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
IDLC parameters object.
The length (in bytes) of the private key value.
The private key value.
The length (in bytes) of the public key value.
The public key value.
The private key object pointer.
The public key object pointer.
A global context.
If both private and public key values are supplied, a private key and/or a public key object can be created. The key objects will be created from the corresponding key values.
If only a private key value is supplied, a private key and/or a public key object can be created. The public key will be computed from the private key.
If only a public key value is supplied, only a public key object can be created.
When a public key is supplied, this function attempts to validate it using the specification in Section 5.6.2.4 of NIST SP 800-56A. This operation is applied when the domain parameter q is available in the IDLC parameters object (idlcParams). In such a case, it will cost approximately the same amount of time as computing a DH shared secret. When an IDLC parameters object does not include the q value, this operation will not be applied. The IDLC parameters object will not include the q value, if the parameters object was created by the hu_IDLCParamsCreate() function, or by the hu_IDLCParamsSet() function without supplying the q value.
The idlcParams object is NULL.
The tag for the params object is not of the expected type.
The private key value is NULL.
The private key length is invalid.
The public key value is NULL.
The public key length is invalid.
The private key value is invalid.
The public key is invalid.
Memory allocation failure.
Success.