hu_IDLCDSANoHashVerify()

Verifies a DSA signature on the given message digest based on FIPS 186.

Synopsis:

#include "huidlc.h"
 
int hu_IDLCDSANoHashVerify(sb_Params idlcParams, sb_PublicKey publicKey, size_t length, const unsigned char *messageDigest, size_t sLength, const unsigned char *sValue, size_t rLength, const unsigned char *rValue, int *result, sb_GlobalCtx sbCtx)

Since:

BlackBerry 10.0.0

Arguments:

idlcParams

An IDLC parameters object.

publicKey

An IDLC public key object.

length

The length (in bytes) of the message digest.

messageDigest

The message digest.

sLength

The length (in bytes) of sValue.

sValue

The s component of the signature.

rLength

The length (in bytes) of rValue.

rValue

The r component of the signature.

result

Verification result. This is non-zero if the signature is valid; otherwise it is zero, meaning the signature is invalid.

sbCtx

A global context.

Library:

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

Description:

This function assumes that the input is a message digest (of any length); no digest operation will be performed on the input.

If the signature is valid for the given digest, this function may return SB_SUCCESS and set result to a non-zero value.

If the signature is not valid for the given digest, this function may return SB_SUCCESS but result will be set to zero.

Returns:

SB_ERR_NULL_PARAMS

The idlcParams 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 public key object is NULL.

SB_ERR_BAD_PUBLIC_KEY

The public key object is invalid.

SB_ERR_BAD_INPUT_BUF_LEN

The length of the message digest is invalid.

SB_ERR_NULL_INPUT_BUF

The message digest is NULL.

SB_ERR_NULL_S_VALUE

The signature component is NULL.

SB_ERR_BAD_S_VALUE_LEN

The signature component length is invalid.

SB_ERR_NULL_R_VALUE

The signature component is NULL.

SB_ERR_BAD_R_VALUE_LEN

The signature component length is invalid.

SB_ERR_NULL_OUTPUT

The verification result pointer is NULL.

SB_FAIL_ALLOC

Memory allocation failure.

SB_SUCCESS

Success.