Data Structures | |
struct | ECDSA_SIG_st |
Defines | |
#define | ECDSA_F_ECDSA_CHECK 104 |
#define | ECDSA_F_ECDSA_DATA_NEW_METHOD 100 |
#define | ECDSA_F_ECDSA_DO_SIGN 101 |
#define | ECDSA_F_ECDSA_DO_VERIFY 102 |
#define | ECDSA_F_ECDSA_METHOD_NEW 105 |
#define | ECDSA_F_ECDSA_SIGN_SETUP 103 |
#define | ECDSA_R_BAD_SIGNATURE 100 |
#define | ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 101 |
#define | ECDSA_R_ERR_EC_LIB 102 |
#define | ECDSA_R_MISSING_PARAMETERS 103 |
#define | ECDSA_R_NEED_NEW_SETUP_VALUES 106 |
#define | ECDSA_R_NON_FIPS_METHOD 107 |
#define | ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 104 |
#define | ECDSA_R_SIGNATURE_MALLOC_FAILED 105 |
Typedefs | |
typedef struct ECDSA_SIG_st | ECDSA_SIG |
Functions | |
ECDSA_SIG * | ECDSA_SIG_new (void) |
void | ECDSA_SIG_free (ECDSA_SIG *sig) |
int | i2d_ECDSA_SIG (const ECDSA_SIG *sig, unsigned char **pp) |
ECDSA_SIG * | d2i_ECDSA_SIG (ECDSA_SIG **sig, const unsigned char **pp, long len) |
ECDSA_SIG * | ECDSA_do_sign (const unsigned char *dgst, int dgst_len, EC_KEY *eckey) |
ECDSA_SIG * | ECDSA_do_sign_ex (const unsigned char *dgst, int dgstlen, const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey) |
int | ECDSA_do_verify (const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, EC_KEY *eckey) |
const ECDSA_METHOD * | ECDSA_OpenSSL (void) |
void | ECDSA_set_default_method (const ECDSA_METHOD *meth) |
const ECDSA_METHOD * | ECDSA_get_default_method (void) |
int | ECDSA_set_method (EC_KEY *eckey, const ECDSA_METHOD *meth) |
int | ECDSA_size (const EC_KEY *eckey) |
int | ECDSA_sign_setup (EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp) |
int | ECDSA_sign (int type, const unsigned char *dgst, int dgstlen, unsigned char *sig, unsigned int *siglen, EC_KEY *eckey) |
int | ECDSA_sign_ex (int type, const unsigned char *dgst, int dgstlen, unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey) |
int | ECDSA_verify (int type, const unsigned char *dgst, int dgstlen, const unsigned char *sig, int siglen, EC_KEY *eckey) |
int | ECDSA_get_ex_new_index (long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) |
int | ECDSA_set_ex_data (EC_KEY *d, int idx, void *arg) |
void * | ECDSA_get_ex_data (EC_KEY *d, int idx) |
ECDSA_METHOD * | ECDSA_METHOD_new (ECDSA_METHOD *ecdsa_method) |
void | ECDSA_METHOD_free (ECDSA_METHOD *ecdsa_method) |
void | ECDSA_METHOD_set_app_data (ECDSA_METHOD *ecdsa_method, void *app) |
void * | ECDSA_METHOD_get_app_data (ECDSA_METHOD *ecdsa_method) |
void | ECDSA_METHOD_set_sign (ECDSA_METHOD *ecdsa_method, ECDSA_SIG *(*ecdsa_do_sign)(const unsigned char *dgst, int dgst_len, const BIGNUM *inv, const BIGNUM *rp, EC_KEY *eckey)) |
void | ECDSA_METHOD_set_sign_setup (ECDSA_METHOD *ecdsa_method, int(*ecdsa_sign_setup)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **r)) |
void | ECDSA_METHOD_set_verify (ECDSA_METHOD *ecdsa_method, int(*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, EC_KEY *eckey)) |
void | ECDSA_METHOD_set_flags (ECDSA_METHOD *ecdsa_method, int flags) |
void | ECDSA_METHOD_set_name (ECDSA_METHOD *ecdsa_method, char *name) |
void | ERR_load_ECDSA_strings (void) |
#define ECDSA_F_ECDSA_CHECK 104 |
#define ECDSA_F_ECDSA_DATA_NEW_METHOD 100 |
#define ECDSA_F_ECDSA_DO_SIGN 101 |
#define ECDSA_F_ECDSA_DO_VERIFY 102 |
#define ECDSA_F_ECDSA_METHOD_NEW 105 |
#define ECDSA_F_ECDSA_SIGN_SETUP 103 |
#define ECDSA_R_BAD_SIGNATURE 100 |
#define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 101 |
#define ECDSA_R_ERR_EC_LIB 102 |
#define ECDSA_R_MISSING_PARAMETERS 103 |
#define ECDSA_R_NEED_NEW_SETUP_VALUES 106 |
#define ECDSA_R_NON_FIPS_METHOD 107 |
#define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 104 |
#define ECDSA_R_SIGNATURE_MALLOC_FAILED 105 |
typedef struct ECDSA_SIG_st ECDSA_SIG |
Decodes a DER encoded ECDSA signature (note: this function changes *pp (*pp += len)).
sig | pointer to ECDSA_SIG pointer (may be NULL) | |
pp | memory buffer with the DER encoded signature | |
len | length of the buffer |
Computes the ECDSA signature of the given hash value using the supplied private key and returns the created signature.
dgst | pointer to the hash value | |
dgst_len | length of the hash value | |
eckey | EC_KEY object containing a private EC key |
ECDSA_SIG* ECDSA_do_sign_ex | ( | const unsigned char * | dgst, | |
int | dgstlen, | |||
const BIGNUM * | kinv, | |||
const BIGNUM * | rp, | |||
EC_KEY * | eckey | |||
) |
Computes ECDSA signature of a given hash value using the supplied private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
dgst | pointer to the hash value to sign | |
dgstlen | length of the hash value | |
kinv | BIGNUM with a pre-computed inverse k (optional) | |
rp | BIGNUM with a pre-computed rp value (optioanl), see ECDSA_sign_setup | |
eckey | EC_KEY object containing a private EC key |
int ECDSA_do_verify | ( | const unsigned char * | dgst, | |
int | dgst_len, | |||
const ECDSA_SIG * | sig, | |||
EC_KEY * | eckey | |||
) |
Verifies that the supplied signature is a valid ECDSA signature of the supplied hash value using the supplied public key.
dgst | pointer to the hash value | |
dgst_len | length of the hash value | |
sig | ECDSA_SIG structure | |
eckey | EC_KEY object containing a public EC key |
const ECDSA_METHOD* ECDSA_get_default_method | ( | void | ) |
Returns the default ECDSA method
void* ECDSA_get_ex_data | ( | EC_KEY * | d, | |
int | idx | |||
) |
int ECDSA_get_ex_new_index | ( | long | argl, | |
void * | argp, | |||
CRYPTO_EX_new * | new_func, | |||
CRYPTO_EX_dup * | dup_func, | |||
CRYPTO_EX_free * | free_func | |||
) |
void ECDSA_METHOD_free | ( | ECDSA_METHOD * | ecdsa_method | ) |
frees a ECDSA_METHOD structure
ecdsa_method | pointer to the ECDSA_METHOD structure |
void* ECDSA_METHOD_get_app_data | ( | ECDSA_METHOD * | ecdsa_method | ) |
Returns application specific data from a ECDSA_METHOD structure
ecdsa_method | pointer to ECDSA_METHOD structure |
ECDSA_METHOD* ECDSA_METHOD_new | ( | ECDSA_METHOD * | ecdsa_method | ) |
Allocates and initialize a ECDSA_METHOD structure
ecdsa_method | pointer to ECDSA_METHOD to copy. (May be NULL) |
void ECDSA_METHOD_set_app_data | ( | ECDSA_METHOD * | ecdsa_method, | |
void * | app | |||
) |
Sets application specific data in the ECDSA_METHOD
ecdsa_method | pointer to existing ECDSA_METHOD | |
app | application specific data to set |
void ECDSA_METHOD_set_flags | ( | ECDSA_METHOD * | ecdsa_method, | |
int | flags | |||
) |
void ECDSA_METHOD_set_name | ( | ECDSA_METHOD * | ecdsa_method, | |
char * | name | |||
) |
Set the flags field in the ECDSA_METHOD
ecdsa_method | pointer to existing ECDSA_METHOD | |
flags | flags value to set |
void ECDSA_METHOD_set_sign | ( | ECDSA_METHOD * | ecdsa_method, | |
ECDSA_SIG *(*)(const unsigned char *dgst, int dgst_len, const BIGNUM *inv, const BIGNUM *rp, EC_KEY *eckey) | ecdsa_do_sign | |||
) |
Set the ECDSA_do_sign function in the ECDSA_METHOD
ecdsa_method | pointer to existing ECDSA_METHOD | |
ecdsa_do_sign | a funtion of type ECDSA_do_sign |
void ECDSA_METHOD_set_sign_setup | ( | ECDSA_METHOD * | ecdsa_method, | |
int(*)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **r) | ecdsa_sign_setup | |||
) |
Set the ECDSA_sign_setup function in the ECDSA_METHOD
ecdsa_method | pointer to existing ECDSA_METHOD | |
ecdsa_sign_setup | a funtion of type ECDSA_sign_setup |
void ECDSA_METHOD_set_verify | ( | ECDSA_METHOD * | ecdsa_method, | |
int(*)(const unsigned char *dgst, int dgst_len, const ECDSA_SIG *sig, EC_KEY *eckey) | ecdsa_do_verify | |||
) |
Set the ECDSA_do_verify function in the ECDSA_METHOD
ecdsa_method | pointer to existing ECDSA_METHOD | |
ecdsa_do_verify | a funtion of type ECDSA_do_verify |
const ECDSA_METHOD* ECDSA_OpenSSL | ( | void | ) |
void ECDSA_set_default_method | ( | const ECDSA_METHOD * | meth | ) |
Sets the default ECDSA method
meth | new default ECDSA_METHOD |
int ECDSA_set_ex_data | ( | EC_KEY * | d, | |
int | idx, | |||
void * | arg | |||
) |
int ECDSA_set_method | ( | EC_KEY * | eckey, | |
const ECDSA_METHOD * | meth | |||
) |
Sets method to be used for the ECDSA operations
eckey | EC_KEY object | |
meth | new method |
void ECDSA_SIG_free | ( | ECDSA_SIG * | sig | ) |
frees a ECDSA_SIG structure
sig | pointer to the ECDSA_SIG structure |
ECDSA_SIG* ECDSA_SIG_new | ( | void | ) |
Allocates and initialize a ECDSA_SIG structure
int ECDSA_sign | ( | int | type, | |
const unsigned char * | dgst, | |||
int | dgstlen, | |||
unsigned char * | sig, | |||
unsigned int * | siglen, | |||
EC_KEY * | eckey | |||
) |
Computes ECDSA signature of a given hash value using the supplied private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
type | this parameter is ignored | |
dgst | pointer to the hash value to sign | |
dgstlen | length of the hash value | |
sig | memory for the DER encoded created signature | |
siglen | pointer to the length of the returned signature | |
eckey | EC_KEY object containing a private EC key |
int ECDSA_sign_ex | ( | int | type, | |
const unsigned char * | dgst, | |||
int | dgstlen, | |||
unsigned char * | sig, | |||
unsigned int * | siglen, | |||
const BIGNUM * | kinv, | |||
const BIGNUM * | rp, | |||
EC_KEY * | eckey | |||
) |
Computes ECDSA signature of a given hash value using the supplied private key (note: sig must point to ECDSA_size(eckey) bytes of memory).
type | this parameter is ignored | |
dgst | pointer to the hash value to sign | |
dgstlen | length of the hash value | |
sig | buffer to hold the DER encoded signature | |
siglen | pointer to the length of the returned signature | |
kinv | BIGNUM with a pre-computed inverse k (optional) | |
rp | BIGNUM with a pre-computed rp value (optioanl), see ECDSA_sign_setup | |
eckey | EC_KEY object containing a private EC key |
Precompute parts of the signing operation
eckey | EC_KEY object containing a private EC key | |
ctx | BN_CTX object (optional) | |
kinv | BIGNUM pointer for the inverse of k | |
rp | BIGNUM pointer for x coordinate of k * generator |
int ECDSA_size | ( | const EC_KEY * | eckey | ) |
Returns the maximum length of the DER encoded signature
eckey | EC_KEY object |
int ECDSA_verify | ( | int | type, | |
const unsigned char * | dgst, | |||
int | dgstlen, | |||
const unsigned char * | sig, | |||
int | siglen, | |||
EC_KEY * | eckey | |||
) |
Verifies that the given signature is valid ECDSA signature of the supplied hash value using the specified public key.
type | this parameter is ignored | |
dgst | pointer to the hash value | |
dgstlen | length of the hash value | |
sig | pointer to the DER encoded signature | |
siglen | length of the DER encoded signature | |
eckey | EC_KEY object containing a public EC key |
void ERR_load_ECDSA_strings | ( | void | ) |
Set the name field in the ECDSA_METHOD
ecdsa_method | pointer to existing ECDSA_METHOD | |
name | name to set |
int i2d_ECDSA_SIG | ( | const ECDSA_SIG * | sig, | |
unsigned char ** | pp | |||
) |
DER encode content of ECDSA_SIG object (note: this function modifies *pp (*pp += length of the DER encoded signature)).
sig | pointer to the ECDSA_SIG object | |
pp | pointer to a unsigned char pointer for the output or NULL |