.. _dlpsigndsa:



DLPSignDSA
==========


Performs the DSA digital signature signing operation.


Syntax
------


IppStatus ippsDLPSignDSA(const IppsBigNumState\* pMsg, const
IppsBigNumState\* pPrivate, IppsBigNumState\* pSignR, IppsBigNumState\*
pSignS, IppsDLPState\* pCtx);


Include Files
-------------


``ippcp.h``


Parameters
----------


.. list-table::
   :header-rows: 0

   * - pMsg
     - Pointer to the message representation *msgRep* to be signed.
   * - pPrivate
     - Pointer to the signer's private key *privKey*.
   * - pSignR
     - Pointer to the *r*-component of the signature.
   * - pSignS
     - Pointer to the *s*-component of the signature.
   * - pCtx
     - Pointer to the cryptosystem context.




Description
-----------


The function performs the DSA digital signature signing operation
provided that the ephemeral signer's key pair (both private and public)
was previously computed (generated by
:ref:`DLPGenKeyPair <dlpgenkeypair>`
or computed by
:ref:`DLPPublicKey <dlppublickey>`)
and then set up into the DLP context by the
:ref:`DLPSetKeyPair <dlpsetkeypair>`
function.


Return Values
-------------


.. list-table::
   :header-rows: 0

   * - 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.
   * - ippStsMessageErr
     - Indicates an error condition if the value of *msgRep* is greater than the multiplicative subgroup characteristic (*q*).
   * - ippStsInvalidPrivateKey
     - Indicates an error condition if an illegal value has been assigned to *privKey*.
   * - ippStsRangeErr
     - Indicates an error condition if any of the signature components has not enough space.



