Generates a shared secret that is the output of an ECMQV key agreement.
#include "huecc.h"
int hu_ECMQVRawSharedGen(sb_Params eccParams, sb_PrivateKey privateKey, sb_PrivateKey ephemPrivateKey, sb_PublicKey ephemPublicKey, sb_PublicKey remotePublicKey, sb_PublicKey remoteEphemPublicKey, size_t *secretLen, unsigned char *sharedSecret, sb_GlobalCtx sbCtx)
BlackBerry 10.0.0
An ECC parameters object.
An ECC private key object.
An ECC private key object.
An ECC public key object.
An ECC public key object.
An ECC public key object.
The length (in bytes) of the shared secret.
The shared secret value.
A global context.
If the length of the shared secret is known, a pointer to a buffer large enough to hold the shared secret should be passed in sharedSecret and its length in secretLen. This function will copy the shared secret into sharedSecret and set the actual length of the shared secret in secretLen.
If sharedSecret is NULL, this function will set the correct length of the shared secret in secretLen. If sharedSecret is not NULL but secretLen is too small, this function will return an error.
The length of the shared secret can also be determined by calling hu_ECCParamsGet() and retrieving the reducLen argument.
The eccParams object is NULL.
The tag for the params object is not of the expected type.
The privateKey object NULL.
The privateKey object invalid.
The ephemeral private key object is NULL.
The ephemeral private key object is invalid.
The ephemeral public key is NULL.
The ephemeral public key is invalid.
The remote public key is NULL.
The remote public key is invalid.
The remote ephemeral public key is NULL.
The remote ephemeral public key is invalid.
The shared secret buffer length is NULL.
The shared secret length is invalid.
Memory allocation failure.
Success.