Data Structures | Typedefs | Enumerations | Functions | Variables
dsa.h File Reference

Go to the source code of this file.

Data Structures

struct  DsaKey
 

Typedefs

typedef struct DsaKey DsaKey
 

Enumerations

enum  { DSA_HALF_SIZE = 20, DSA_SIG_SIZE = 40 }
 

Functions

WOLFSSL_API int wc_InitDsaKey (DsaKey *key)
 This function initializes a DsaKey object in order to use it for authentication via the Digital Signature Algorithm (DSA). More...
 
WOLFSSL_API int wc_InitDsaKey_h (DsaKey *key, void *h)
 
WOLFSSL_API void wc_FreeDsaKey (DsaKey *key)
 This function frees a DsaKey object after it has been used. More...
 
WOLFSSL_API int wc_DsaSign (const byte *digest, byte *out, DsaKey *key, WC_RNG *rng)
 This function signs the input digest and stores the result in the output buffer, out. More...
 
WOLFSSL_API int wc_DsaVerify (const byte *digest, const byte *sig, DsaKey *key, int *answer)
 This function verifies the signature of a digest, given a private key. It stores whether the key properly verifies in the answer parameter, with 1 corresponding to a successful verification, and 0 corresponding to failed verification. More...
 
WOLFSSL_API int wc_DsaPublicKeyDecode (const byte *input, word32 *inOutIdx, DsaKey *, word32)
 
WOLFSSL_API int wc_DsaPrivateKeyDecode (const byte *input, word32 *inOutIdx, DsaKey *, word32)
 
WOLFSSL_API int wc_DsaKeyToDer (DsaKey *key, byte *output, word32 inLen)
 Convert DsaKey key to DER format, write to output (inLen), return bytes written. More...
 
WOLFSSL_API int wc_SetDsaPublicKey (byte *output, DsaKey *key, int outLen, int with_header)
 
WOLFSSL_API int wc_DsaKeyToPublicDer (DsaKey *key, byte *output, word32 inLen)
 
WOLFSSL_API int wc_MakeDsaKey (WC_RNG *rng, DsaKey *dsa)
 Create a DSA key. More...
 
WOLFSSL_API int wc_MakeDsaParameters (WC_RNG *rng, int modulus_size, DsaKey *dsa)
 FIPS 186-4 defines valid for modulus_size values as (1024, 160) (2048, 256) (3072, 256) More...
 
WOLFSSL_API int wc_DsaImportParamsRaw (DsaKey *dsa, const char *p, const char *q, const char *g)
 
WOLFSSL_API int wc_DsaImportParamsRawCheck (DsaKey *dsa, const char *p, const char *q, const char *g, int trusted, WC_RNG *rng)
 
WOLFSSL_API int wc_DsaExportParamsRaw (DsaKey *dsa, byte *p, word32 *pSz, byte *q, word32 *qSz, byte *g, word32 *gSz)
 
WOLFSSL_API int wc_DsaExportKeyRaw (DsaKey *dsa, byte *x, word32 *xSz, byte *y, word32 *ySz)
 

Variables

 C
 

Variable Documentation

◆ C

C
Initial value:
{
#endif
enum {
DSA_PUBLIC = 0,
DSA_PRIVATE = 1
}