hu_ECQVPriKeyDerive()

Derives a private key from private key request data, private key reconstruction data and a hash of the certificate.

Synopsis:

#include "huecc.h"
 
int hu_ECQVPriKeyDerive(sb_Params eccParams, sb_PrivateKey privateKeyRequestData, sb_PrivateKey privateKeyReconstData, size_t digestLen, const unsigned char *messageDigest, sb_PrivateKey *privateKey, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

eccParams

An ECC parameters object.

privateKeyRequestData

An ECC private key object of the requester's private key request data.

privateKeyReconstData

An ECC private key object of the private key reconstruction data.

digestLen

The length of the message digest.

messageDigest

Message digest of the certificate.

privateKey

ECC private key object pointer of the requester's private key.

sbCtx

A global context.

Library:

libhuapi (For the qcc command, use the -l huapi option to link against this library)

Description:

Please note that this is function does not perform any hashing, and therefore, the message digest of the certificate must be supplied in messageDigest.

Returns:

SB_ERR_NULL_PARAMS

The eccParams object is NULL.

SB_ERR_BAD_PARAMS

The tag for the params object is not of the expected type.

SB_ERR_NULL_EPHEM_PRI_KEY

The privateKeyRequestData object is NULL.

SB_ERR_BAD_EPHEM_PRI_KEY

The privateKeyRequestData object is invalid.

SB_ERR_NULL_PRIVATE_KEY

The privateKeyReconstData object is NULL.

SB_ERR_BAD_PRIVATE_KEY

The privateKeyReconstData object is invalid.

SB_ERR_NULL_INPUT_BUF

Message digest pointer is NULL.

SB_ERR_BAD_INPUT_LEN

Message digest length is zero.

SB_ERR_NULL_OUTPUT

The privateKey object pointer is NULL.

SB_FAIL_ALLOC

Memory allocation failure.

SB_SUCCESS

Success.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus