59 #ifndef HEADER_ECDSA_H
60 #define HEADER_ECDSA_H
62 #include <openssl/opensslconf.h>
64 #ifdef OPENSSL_NO_ECDSA
65 #error ECDSA is disabled.
68 #include <openssl/ec.h>
69 #include <openssl/ossl_typ.h>
70 #ifndef OPENSSL_NO_DEPRECATED
71 #include <openssl/bn.h>
100 int i2d_ECDSA_SIG(
const ECDSA_SIG *sig,
unsigned char **pp);
118 ECDSA_SIG *ECDSA_do_sign(
const unsigned char *dgst,
int dgst_len,EC_KEY *eckey);
130 ECDSA_SIG *ECDSA_do_sign_ex(
const unsigned char *dgst,
int dgstlen,
142 int ECDSA_do_verify(
const unsigned char *dgst,
int dgst_len,
145 const ECDSA_METHOD *ECDSA_OpenSSL(
void);
150 void ECDSA_set_default_method(
const ECDSA_METHOD *meth);
155 const ECDSA_METHOD *ECDSA_get_default_method(
void);
162 int ECDSA_set_method(EC_KEY *eckey,
const ECDSA_METHOD *meth);
168 int ECDSA_size(
const EC_KEY *eckey);
177 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx,
BIGNUM **kinv,
190 int ECDSA_sign(
int type,
const unsigned char *dgst,
int dgstlen,
191 unsigned char *sig,
unsigned int *siglen, EC_KEY *eckey);
207 int ECDSA_sign_ex(
int type,
const unsigned char *dgst,
int dgstlen,
208 unsigned char *sig,
unsigned int *siglen,
const BIGNUM *kinv,
209 const BIGNUM *rp, EC_KEY *eckey);
222 int ECDSA_verify(
int type,
const unsigned char *dgst,
int dgstlen,
223 const unsigned char *sig,
int siglen, EC_KEY *eckey);
226 int ECDSA_get_ex_new_index(
long argl,
void *argp, CRYPTO_EX_new
227 *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
228 int ECDSA_set_ex_data(EC_KEY *d,
int idx,
void *arg);
229 void *ECDSA_get_ex_data(EC_KEY *d,
int idx);
236 void ERR_load_ECDSA_strings(
void);
241 #define ECDSA_F_ECDSA_CHECK 104
242 #define ECDSA_F_ECDSA_DATA_NEW_METHOD 100
243 #define ECDSA_F_ECDSA_DO_SIGN 101
244 #define ECDSA_F_ECDSA_DO_VERIFY 102
245 #define ECDSA_F_ECDSA_SIGN_SETUP 103
248 #define ECDSA_R_BAD_SIGNATURE 100
249 #define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 101
250 #define ECDSA_R_ERR_EC_LIB 102
251 #define ECDSA_R_MISSING_PARAMETERS 103
252 #define ECDSA_R_NEED_NEW_SETUP_VALUES 106
253 #define ECDSA_R_NON_FIPS_METHOD 107
254 #define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 104
255 #define ECDSA_R_SIGNATURE_MALLOC_FAILED 105