26#ifndef WOLF_CRYPT_DSA_H
27#define WOLF_CRYPT_DSA_H
33#include <wolfssl/wolfcrypt/integer.h>
37#define InitDsaKey wc_InitDsaKey
38#define FreeDsaKey wc_FreeDsaKey
39#define DsaSign wc_DsaSign
40#define DsaVerify wc_DsaVerify
41#define DsaPublicKeyDecode wc_DsaPublicKeyDecode
42#define DsaPrivateKeyDecode wc_DsaPrivateKeyDecode
43#define DsaKeyToDer wc_DsaKeyToDer
68WOLFSSL_API
int wc_InitDsaKey_h(
DsaKey* key,
void* h);
70WOLFSSL_API
int wc_DsaSign(
const byte* digest,
byte* out,
72WOLFSSL_API
int wc_DsaVerify(
const byte* digest,
const byte* sig,
79WOLFSSL_API
int wc_SetDsaPublicKey(
byte* output,
DsaKey* key,
80 int outLen,
int with_header);
81WOLFSSL_API
int wc_DsaKeyToPublicDer(
DsaKey* key,
byte* output, word32 inLen);
89WOLFSSL_API
int wc_DsaImportParamsRaw(
DsaKey* dsa,
const char* p,
90 const char* q,
const char* g);
91WOLFSSL_API
int wc_DsaImportParamsRawCheck(
DsaKey* dsa,
const char* p,
92 const char* q,
const char* g,
94WOLFSSL_API
int wc_DsaExportParamsRaw(
DsaKey* dsa,
byte* p, word32* pSz,
95 byte* q, word32* qSz,
byte* g,
97WOLFSSL_API
int wc_DsaExportKeyRaw(
DsaKey* dsa,
byte* x, word32* xSz,
byte* y,
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.
Definition dsa.c:655
WOLFSSL_API int wc_DsaPrivateKeyDecode(const byte *input, word32 *inOutIdx, DsaKey *, word32)
This function decodes a DER formatted certificate buffer containing a DSA private key,...
WOLFSSL_API int wc_DsaKeyToDer(DsaKey *key, byte *output, word32 inLen)
Convert DsaKey key to DER format, write to output (inLen), return bytes written.
Definition asn.c:4858
WOLFSSL_API int wc_InitDsaKey(DsaKey *key)
This function initializes a DsaKey object in order to use it for authentication via the Digital Signa...
Definition dsa.c:45
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 prop...
Definition dsa.c:848
WOLFSSL_API int wc_MakeDsaKey(WC_RNG *rng, DsaKey *dsa)
Create a DSA key.
Definition dsa.c:133
WOLFSSL_API int wc_DsaPublicKeyDecode(const byte *input, word32 *inOutIdx, DsaKey *, word32)
This function decodes a DER formatted certificate buffer containing a DSA public key,...
WOLFSSL_API void wc_FreeDsaKey(DsaKey *key)
This function frees a DsaKey object after it has been used.
Definition dsa.c:77
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,...
Definition dsa.c:220