hu_ECQVPubKeyConv()

Converts public key reconstruction data into a public key using the CA's public key and a hash of the certificate.

Synopsis:

#include "huecc.h"
 
int hu_ECQVPubKeyConv(sb_Params eccParams, sb_PublicKey publicKeyReconstData, sb_PublicKey caPublicKey, size_t digestLen, const unsigned char *messageDigest, sb_PublicKey *publicKey, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

eccParams

An ECC parameters object.

publicKeyReconstData

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

caPublicKey

An ECC public key object of CA's public key.

digestLen

The length of the message digest.

messageDigest

Message digest of the certificate.

publicKey

ECC public key object pointer of the resulting public 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_PUBLIC_KEY

The publicKeyReconstData object is NULL.

SB_ERR_BAD_PUBLIC_KEY

The publicKeyReconstData object is invalid.

SB_ERR_NULL_REM_PUB_KEY

The caPublicKey object is NULL.

SB_ERR_BAD_REM_PUB_KEY

The caPublicKey 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 publicKey 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