Go to the documentation of this file.
71 #error DSA is disabled.
74 #ifndef OPENSSL_NO_BIO
80 #ifndef OPENSSL_NO_DEPRECATED
87 #ifndef OPENSSL_DSA_MAX_MODULUS_BITS
88 # define OPENSSL_DSA_MAX_MODULUS_BITS 10000
91 #define DSA_FLAG_CACHE_MONT_P 0x01
92 #define DSA_FLAG_NO_EXP_CONSTTIME 0x02
106 #define DSA_FLAG_FIPS_METHOD 0x0400
113 #define DSA_FLAG_NON_FIPS_ALLOW 0x0400
132 DSA_SIG * (*dsa_do_sign)(
const unsigned char *dgst,
int dlen,
DSA *dsa);
135 int (*
dsa_do_verify)(
const unsigned char *dgst,
int dgst_len,
149 const unsigned char *
seed,
int seed_len,
150 int *counter_ret,
unsigned long *h_ret,
183 #define d2i_DSAparams_fp(fp,x) (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \
184 (char *(*)())d2i_DSAparams,(fp),(unsigned char **)(x))
185 #define i2d_DSAparams_fp(fp,x) ASN1_i2d_fp(i2d_DSAparams,(fp), \
186 (unsigned char *)(x))
187 #define d2i_DSAparams_bio(bp,x) ASN1_d2i_bio_of(DSA,DSA_new,d2i_DSAparams,bp,x)
188 #define i2d_DSAparams_bio(bp,x) ASN1_i2d_bio_of_const(DSA,i2d_DSAparams,bp,x)
215 int DSA_sign(
int type,
const unsigned char *dgst,
int dlen,
216 unsigned char *sig,
unsigned int *siglen,
DSA *dsa);
218 const unsigned char *sigbuf,
int siglen,
DSA *dsa);
229 #ifndef OPENSSL_NO_DEPRECATED
231 unsigned char *
seed,
int seed_len,
232 int *counter_ret,
unsigned long *h_ret,
void
233 (*
callback)(
int,
int,
void *),
void *cb_arg);
238 const unsigned char *seed,
int seed_len,
239 int *counter_ret,
unsigned long *h_ret,
BN_GENCB *
cb);
246 #ifndef OPENSSL_NO_BIO
250 #ifndef OPENSSL_NO_FP_API
255 #define DSS_prime_checks 50
258 #define DSA_is_prime(n, callback, cb_arg) \
259 BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg)
261 #ifndef OPENSSL_NO_DH
267 #define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \
268 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \
269 EVP_PKEY_CTRL_DSA_PARAMGEN_BITS, nbits, NULL)
271 #define EVP_PKEY_CTRL_DSA_PARAMGEN_BITS (EVP_PKEY_ALG_CTRL + 1)
272 #define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2)
273 #define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3)
284 #define DSA_F_D2I_DSA_SIG 110
285 #define DSA_F_DO_DSA_PRINT 104
286 #define DSA_F_DSAPARAMS_PRINT 100
287 #define DSA_F_DSAPARAMS_PRINT_FP 101
288 #define DSA_F_DSA_DO_SIGN 112
289 #define DSA_F_DSA_DO_VERIFY 113
290 #define DSA_F_DSA_GENERATE_KEY 124
291 #define DSA_F_DSA_GENERATE_PARAMETERS_EX 123
292 #define DSA_F_DSA_NEW_METHOD 103
293 #define DSA_F_DSA_PARAM_DECODE 119
294 #define DSA_F_DSA_PRINT_FP 105
295 #define DSA_F_DSA_PRIV_DECODE 115
296 #define DSA_F_DSA_PRIV_ENCODE 116
297 #define DSA_F_DSA_PUB_DECODE 117
298 #define DSA_F_DSA_PUB_ENCODE 118
299 #define DSA_F_DSA_SIGN 106
300 #define DSA_F_DSA_SIGN_SETUP 107
301 #define DSA_F_DSA_SIG_NEW 109
302 #define DSA_F_DSA_SIG_PRINT 125
303 #define DSA_F_DSA_VERIFY 108
304 #define DSA_F_I2D_DSA_SIG 111
305 #define DSA_F_OLD_DSA_PRIV_DECODE 122
306 #define DSA_F_PKEY_DSA_CTRL 120
307 #define DSA_F_PKEY_DSA_KEYGEN 121
308 #define DSA_F_SIG_CB 114
311 #define DSA_R_BAD_Q_VALUE 102
312 #define DSA_R_BN_DECODE_ERROR 108
313 #define DSA_R_BN_ERROR 109
314 #define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100
315 #define DSA_R_DECODE_ERROR 104
316 #define DSA_R_INVALID_DIGEST_TYPE 106
317 #define DSA_R_MISSING_PARAMETERS 101
318 #define DSA_R_MODULUS_TOO_LARGE 103
319 #define DSA_R_NEED_NEW_SETUP_VALUES 110
320 #define DSA_R_NON_FIPS_DSA_METHOD 111
321 #define DSA_R_NO_PARAMETERS_SET 107
322 #define DSA_R_PARAMETER_ENCODING_ERROR 105