hu_ECGDSANoHashVerify()

Verifies an Elliptic Curve German Digital Signature Algorithm (ECGDSA) signature.

Synopsis:

#include "huecc.h"
 
int hu_ECGDSANoHashVerify(sb_Params eccParams, 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.2.0

Arguments:

eccParams

An ECC parameters object.

publicKey

An ECC public key object.

length

The length (in bytes) of the message digest.

messageDigest

A 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

The verification result. This is non-zero if the signature is valid; zero if 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:

An ECGDSA signature consists of the following two components:

The s value is the result of the signature equation.

The r value is the x co-ordinate of the ephemeral public key.

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

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

Returns:

SB_ERR_NULL_PARAMS

ECC parameters object is NULL

SB_ERR_BAD_PARAMS

ECC parameters object is invalid.

SB_ERR_NULL_PUBLIC_KEY

Public key is NULL.

SB_ERR_BAD_PUBLIC_KEY

Public key is invalid.

SB_ERR_NULL_INPUT_BUF

Message digest pointer is NULL.

SB_ERR_BAD_INPUT_BUF_LEN

Message digest length is invalid.

SB_ERR_NULL_S_VALUE

The s value buffer pointer is NULL.

SB_ERR_BAD_S_VALUE_BUF_LEN

The s value buffer is invalid.

SB_ERR_NULL_R_VALUE

The r value buffer pointer is NULL.

SB_ERR_BAD_R_VALUE_BUF_LEN

The r value buffer is invalid.

SB_ERR_NULL_OUTPUT

Result pointer is NULL.

SB_FAIL_ALLOC

Memory allocation failure.

SB_FAILURE

Operation failed.

SB_SUCCESS

Success.

Last modified: 2014-05-14



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

comments powered by Disqus