DLPValidateDH¶
Validates domain parameters of the DL-based cryptosystem over GF(p) to use the DH Agreement scheme.
Syntax¶
IppStatus ippsDLPValidateDH(int nTrials, IppDLResult* pResult, IppsDLPState* pCtx, IppBitSupplier rndFunc, void* pRndParam);
Include Files¶
ippcp.h
Parameters¶
nTrials |
Security parameter specified for the Miller-Rabin probable primality. |
pResult |
Pointer to the validation result. |
pCtx |
Pointer to the cryptosystem context. |
rndFunc |
Specified Random Generator. |
pRndParam |
Pointer to the Random Generator context. |
Description¶
The function validates domain parameters of the DL-based cryptosystem over GF(p) to use Diffie-Hellman Agreement scheme. The result of validation is stored in the *pResult and may be assigned to one of the enumerators listed below:
ippDLValid |
Validation has passed successfully. |
ippDLBaseIsEven |
|
ippDLOrderIsEven |
|
ippDLInvalidBaseRange |
|
ippDLInvalidOrderRange |
|
ippDLCompositeBase |
|
ippDLCompositeOrder |
|
ippDLInvalidCofactor |
|
ippDLInvalidGenerator |
(1 < ``G`` < ( |
To ensure that both p and r are primes, the function applies nTrial-round Miller-Rabin primality test. Test data for primality test is provided by the specified rndFunc Random Generator.
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 is NULL. |
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. |
ippStsBadArgErr |
Indicates an error condition if nTrials < 1. |