Eneboo - Documentación para desarrolladores
Clases | 'defines' | 'typedefs' | Funciones
Referencia del Archivo src/libdigidoc/openssl/crypto/ecdsa/ecdsa.h
#include <openssl/opensslconf.h>
#include <openssl/ec.h>
#include <openssl/ossl_typ.h>
#include <openssl/bn.h>

Ir al código fuente de este archivo.

Clases

struct  ECDSA_SIG_st

'defines'

#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_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_RANDOM_NUMBER_GENERATION_FAILED   104
#define ECDSA_R_SIGNATURE_MALLOC_FAILED   105

'typedefs'

typedef struct ECDSA_SIG_st ECDSA_SIG

Funciones

ECDSA_SIGECDSA_SIG_new (void)
void ECDSA_SIG_free (ECDSA_SIG *a)
int i2d_ECDSA_SIG (const ECDSA_SIG *a, unsigned char **pp)
ECDSA_SIGd2i_ECDSA_SIG (ECDSA_SIG **v, const unsigned char **pp, long len)
ECDSA_SIGECDSA_do_sign (const unsigned char *dgst, int dgst_len, EC_KEY *eckey)
ECDSA_SIGECDSA_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_METHODECDSA_OpenSSL (void)
void ECDSA_set_default_method (const ECDSA_METHOD *meth)
const ECDSA_METHODECDSA_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)
void ERR_load_ECDSA_strings (void)

Descripción detallada

Include file for the OpenSSL ECDSA functions

Autor:
Written by Nils Larsch for the OpenSSL project

Documentación de los 'defines'

#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_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_RANDOM_NUMBER_GENERATION_FAILED   104
#define ECDSA_R_SIGNATURE_MALLOC_FAILED   105

Documentación de los 'typedefs'

typedef struct ECDSA_SIG_st ECDSA_SIG

Documentación de las funciones

ECDSA_SIG* d2i_ECDSA_SIG ( ECDSA_SIG **  v,
const unsigned char **  pp,
long  len 
)

d2i_ECDSA_SIG decodes a DER encoded ECDSA signature (note: this function changes *pp (*pp += len)).

Parámetros:
vpointer to ECDSA_SIG pointer (may be NULL)
ppbuffer with the DER encoded signature
lenbufferlength
Devuelve:
pointer to the decoded ECDSA_SIG structure (or NULL)
ECDSA_SIG* ECDSA_do_sign ( const unsigned char *  dgst,
int  dgst_len,
EC_KEY eckey 
)

ECDSA_do_sign computes the ECDSA signature of the given hash value using the supplied private key and returns the created signature.

Parámetros:
dgstpointer to the hash value
dgst_lenlength of the hash value
eckeypointer to the EC_KEY object containing a private EC key
Devuelve:
pointer to a ECDSA_SIG structure or NULL
ECDSA_SIG* ECDSA_do_sign_ex ( const unsigned char *  dgst,
int  dgstlen,
const BIGNUM kinv,
const BIGNUM rp,
EC_KEY eckey 
)

ECDSA_do_sign_ex computes ECDSA signature of a given hash value using the supplied private key (note: sig must point to ECDSA_size(eckey) bytes of memory).

Parámetros:
dgstpointer to the hash value to sign
dgstlenlength of the hash value
kinvoptional pointer to a pre-computed inverse k
rpoptional pointer to the pre-computed rp value (see ECDSA_sign_setup
eckeypointer to the EC_KEY object containing a private EC key
Devuelve:
pointer to a ECDSA_SIG structure or NULL
int ECDSA_do_verify ( const unsigned char *  dgst,
int  dgst_len,
const ECDSA_SIG sig,
EC_KEY eckey 
)

ECDSA_do_verify verifies that the supplied signature is a valid ECDSA signature of the supplied hash value using the supplied public key.

Parámetros:
dgstpointer to the hash value
dgst_lenlength of the hash value
sigpointer to the ECDSA_SIG structure
eckeypointer to the EC_KEY object containing a public EC key
Devuelve:
1 if the signature is valid, 0 if the signature is invalid and -1 on error
const ECDSA_METHOD* ECDSA_get_default_method ( void  )

ECDSA_get_default_method returns the default ECDSA method

Devuelve:
pointer to ECDSA_METHOD structure containing the default 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 
)
const ECDSA_METHOD* ECDSA_OpenSSL ( void  )
void ECDSA_set_default_method ( const ECDSA_METHOD meth)

ECDSA_set_default_method sets the default ECDSA method

Parámetros:
meththe 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 
)

ECDSA_set_method sets method to be used for the ECDSA operations

Parámetros:
eckeypointer to the EC_KEY object
methpointer to the new method
Devuelve:
1 on success and 0 otherwise
void ECDSA_SIG_free ( ECDSA_SIG a)

ECDSA_SIG_free frees a ECDSA_SIG structure

Parámetros:
apointer to the ECDSA_SIG structure
ECDSA_SIG* ECDSA_SIG_new ( void  )

ECDSA_SIG *ECDSA_SIG_new(void) allocates and initialize a ECDSA_SIG structure

Devuelve:
pointer to a ECDSA_SIG structure or NULL if an error occurred
int ECDSA_sign ( int  type,
const unsigned char *  dgst,
int  dgstlen,
unsigned char *  sig,
unsigned int siglen,
EC_KEY eckey 
)

ECDSA_sign computes ECDSA signature of a given hash value using the supplied private key (note: sig must point to ECDSA_size(eckey) bytes of memory).

Parámetros:
typethis parameter is ignored
dgstpointer to the hash value to sign
dgstlenlength of the hash value
sigbuffer to hold the DER encoded signature
siglenpointer to the length of the returned signature
eckeypointer to the EC_KEY object containing a private EC key
Devuelve:
1 on success and 0 otherwise
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 
)

ECDSA_sign_ex computes ECDSA signature of a given hash value using the supplied private key (note: sig must point to ECDSA_size(eckey) bytes of memory).

Parámetros:
typethis parameter is ignored
dgstpointer to the hash value to sign
dgstlenlength of the hash value
sigbuffer to hold the DER encoded signature
siglenpointer to the length of the returned signature
kinvoptional pointer to a pre-computed inverse k
rpoptional pointer to the pre-computed rp value (see ECDSA_sign_setup
eckeypointer to the EC_KEY object containing a private EC key
Devuelve:
1 on success and 0 otherwise
int ECDSA_sign_setup ( EC_KEY eckey,
BN_CTX ctx,
BIGNUM **  kinv,
BIGNUM **  rp 
)

ECDSA_sign_setup precompute parts of the signing operation.

Parámetros:
eckeypointer to the EC_KEY object containing a private EC key
ctxpointer to a BN_CTX object (may be NULL)
kinvpointer to a BIGNUM pointer for the inverse of k
rppointer to a BIGNUM pointer for x coordinate of k * generator
Devuelve:
1 on success and 0 otherwise
int ECDSA_size ( const EC_KEY eckey)

ECDSA_size returns the maximum length of the DER encoded signature

Parámetros:
eckeypointer to a EC_KEY object
Devuelve:
numbers of bytes required for the DER encoded signature
int ECDSA_verify ( int  type,
const unsigned char *  dgst,
int  dgstlen,
const unsigned char *  sig,
int  siglen,
EC_KEY eckey 
)

ECDSA_verify verifies that the given signature is valid ECDSA signature of the supplied hash value using the specified public key.

Parámetros:
typethis parameter is ignored
dgstpointer to the hash value
dgstlenlength of the hash value
sigpointer to the DER encoded signature
siglenlength of the DER encoded signature
eckeypointer to the EC_KEY object containing a public EC key
Devuelve:
1 if the signature is valid, 0 if the signature is invalid and -1 on error
void ERR_load_ECDSA_strings ( void  )
int i2d_ECDSA_SIG ( const ECDSA_SIG a,
unsigned char **  pp 
)

i2d_ECDSA_SIG DER encode content of ECDSA_SIG object (note: this function modifies *pp (*pp += length of the DER encoded signature)).

Parámetros:
apointer to the ECDSA_SIG object
pppointer to a unsigned char pointer for the output or NULL
Devuelve:
the length of the DER encoded ECDSA_SIG object or 0
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'