Computes a shared secret field element by using the Diffie-Hellman scheme and the elliptic curve cofactor.
IppStatus ippsECCPSharedSecretDHC(const IppsBigNumState* pPrivate, const IppsECCPPointState* pPublic, IppsBigNumState* pShare, IppsECCPState* pECC);
pPrivate |
Pointer to your own public key pubKey. |
pPublic |
Pointer to the public key pubKey. |
pShare |
Pointer to the secret number bnShare. |
pECC |
Pointer to the context of the elliptic cryptosystem. |
This function is declared in the ippcp.h file.
The function computes a secret number bnShare which is a secret key shared between two participants of the cryptosystem. Both participants (Alice and Bob) use the cryptosystem for getting a common secret point on the elliptic curve by using the Diffie-Hellman scheme and elliptic curve cofactor h.
Alice and Bob perform the following operations:
Shared secret bnShare is an x-coordinate of the secret point on the elliptic curve.
The elliptic curve domain parameters must be hitherto defined by one of the functions: ECCPSet or ECCPSetStd.
ippStsNoErr |
Indicates no error. Any other value indicates an error or warning. |
ippStsNullPtrErr |
Indicates an error condition if any of the specified pointers is NULL. |
ippStsContextMatchErr |
Indicates an error condition if one of the contexts pointed by pPublic, pPShare, or pECC is not valid. |
ippStsRangeErr |
Indicates an error condition if the memory size of bnShare pointed by pShare is less than the value of feBitSize in the function ECCPInit. |
ippStsShareKeyErr |
Indicates an error condition if the shared secret key is not valid. (For example, the shared secret key is invalid if the result of the secret point calculation is the point at infinity. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.