Eneboo - Documentación para desarrolladores
Funciones
Referencia del Archivo src/libdigidoc/openssl/crypto/ecdsa/ecs_sign.c
#include "ecs_locl.h"
#include <openssl/engine.h>
#include <openssl/rand.h>

Funciones

ECDSA_SIGECDSA_do_sign (const unsigned char *dgst, int dlen, EC_KEY *eckey)
ECDSA_SIGECDSA_do_sign_ex (const unsigned char *dgst, int dlen, const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey)
int ECDSA_sign (int type, const unsigned char *dgst, int dlen, unsigned char *sig, unsigned int *siglen, EC_KEY *eckey)
int ECDSA_sign_ex (int type, const unsigned char *dgst, int dlen, unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey)
int ECDSA_sign_setup (EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)

Documentación de las funciones

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_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
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'