hu_ECQVPriKeyReconstGen()

Generates private key reconstruction data from the CA's private key, the CA's ephemeral private key and a hash of the certificate.

Synopsis:

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

Since:

BlackBerry 10.0.0

Arguments:

eccParams

An ECC parameters object.

privateKey

An ECC private key object of the CA's private key.

ephemeralPrivateKey

An ECC private key object of the CA's ephemeral private key.

digestLen

The length of the message digest.

messageDigest

Message digest of the certificate.

privateKeyReconstData

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

sbCtx

A global context.

Library:

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

Description:

The public key reconstruction data must be generated prior to calling this function and it must be included in the certificate.

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_PRIVATE_KEY

The privateKey object is NULL.

SB_ERR_BAD_PRIVATE_KEY

The privateKey object is invalid.

SB_ERR_NULL_EPHEM_PRI_KEY

The ephemeralPrivateKey object is NULL.

SB_ERR_BAD_EPHEM_PRI_KEY

The ephemeralPrivateKey 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 privateKeyReconstData 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