DLPSharedSecretDH
DLPSharedSecretDH
Computes a shared field element by using the Diffie-Hellman scheme.
Syntax
IppStatus ippsDLPSharedSecretDH(const IppsBigNumState*
pPrivateA
, const IppsBigNumState*
pPublicB
, IppsBigNumState*
pShare
, IppsDLPState*
pCtx
);
Include Files
ippcp.h
Parameters
- pPrivateA
- Pointer to your own private keyprivateKeyA.
- pPublicB
- Pointer to the public keypubKeyBbelonging to the other party.
- pShare
- Pointer to the shared secret elementShare.
- pCtx
- Pointer to the cryptosystem context.
Description
The function computes a shared secret element FG(p) (
pubKeyB
privateKeyA
mod
p
).Return Values
- ippStsNoErr
- Indicates no error. Any other value indicates an error or warning.
- ippStsNullPtrErr
- Indicates an error condition if any of the specified pointers isNULL.
- ippStsContextMatchErr
- Indicates an error condition if the context parameter does not match the operation.
- ippStsIncompleteContextErr
- Indicates an error condition if the cryptosystem context has not been properly set up.
- ippStsRangeErr
- Indicates an error condition ifSharedoes not have enough space.