hu_ECQVPriKeyValidate()

Checks that the private key reconstruction data and certificate are valid using public key request data, public key reconstruction data, the CA's public key, and a hash of the certificate.

Synopsis:

#include "huecc.h"
 
int hu_ECQVPriKeyValidate(sb_Params eccParams, sb_PrivateKey privateKeyReconstData, sb_PublicKey publicKeyReconstData, sb_PublicKey publicKeyRequestData, sb_PublicKey caPublicKey, size_t digestLen, const unsigned char *messageDigest, int *result, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

eccParams

An ECC parameters object.

privateKeyReconstData

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

publicKeyReconstData

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

publicKeyRequestData

An ECC public key object of the requester's public key request 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.

result

The validation result. This is non-zero if valid; zero if invalid.

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_PRIVATE_KEY

The privateKeyReconstData object is NULL.

SB_ERR_BAD_PRIVATE_KEY

The privateKeyReconstData object is invalid.

SB_ERR_NULL_PUBLIC_KEY

The publicKeyReconstData object is NULL.

SB_ERR_BAD_PUBLIC_KEY

The publicKeyReconstData object is invalid.

SB_ERR_NULL_EPHEM_PUB_KEY

The publicKeyRequestData object is NULL.

SB_ERR_BAD_EPHEM_PUB_KEY

The publicKeyRequestData 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 validation result 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