|
libzpc 1.5
IBM Z Protected-key Crypto library
|
ECDSA-CTX API. More...
Go to the source code of this file.
Functions | |
| int | zpc_ecdsa_ctx_alloc (struct zpc_ecdsa_ctx **ctx) |
| int | zpc_ecdsa_ctx_set_key (struct zpc_ecdsa_ctx *ctx, struct zpc_ec_key *key) |
| int | zpc_ecdsa_sign (struct zpc_ecdsa_ctx *ctx, const unsigned char *hash, unsigned int hash_len, unsigned char *signature, unsigned int *sig_len) |
| int | zpc_ecdsa_verify (struct zpc_ecdsa_ctx *ctx, const unsigned char *hash, unsigned int hash_len, const unsigned char *signature, unsigned int sig_len) |
| void | zpc_ecdsa_ctx_free (struct zpc_ecdsa_ctx **ctx) |
ECDSA-CTX API.
Sign/verify API for elliptic curve cryptography (ECDSA) algorithms. [5] sign/verify
Definition in file ecdsa_ctx.h.
| int zpc_ecdsa_ctx_alloc | ( | struct zpc_ecdsa_ctx ** | ctx | ) |
Allocate a new context for an ECDSA sign/verify operation.
| [in,out] | ctx | ECDSA context |
| int zpc_ecdsa_ctx_set_key | ( | struct zpc_ecdsa_ctx * | ctx, |
| struct zpc_ec_key * | key ) |
Set the key to be used in the context of an ECDSA sign/verify operation.
| [in,out] | ctx | ECDSA context |
| [in] | key | EC key |
| int zpc_ecdsa_sign | ( | struct zpc_ecdsa_ctx * | ctx, |
| const unsigned char * | hash, | ||
| unsigned int | hash_len, | ||
| unsigned char * | signature, | ||
| unsigned int * | sig_len ) |
Do an ECDSA sign operation.
| [in,out] | ctx | ECDSA context |
| [in] | hash | input message to sign |
| [in] | hash_len | input message length [bytes] |
| [out] | signature | signature |
| [in,out] | *sig_len | address of signature length field [bytes] On input, the application must specify the buffer length to receive the signature [bytes]. If signature is NULL, only the length of the signature is returned. |
| int zpc_ecdsa_verify | ( | struct zpc_ecdsa_ctx * | ctx, |
| const unsigned char * | hash, | ||
| unsigned int | hash_len, | ||
| const unsigned char * | signature, | ||
| unsigned int | sig_len ) |
Do an ECDSA verify operation.
| [in,out] | ctx | ECDSA context |
| [in] | hash | input message to verify |
| [in] | hash_len | input message length [bytes] |
| [in] | signature | signature to verify |
| [in] | sig_len | signature length |
| void zpc_ecdsa_ctx_free | ( | struct zpc_ecdsa_ctx ** | ctx | ) |
Free an ECDSA context.
| [in,out] | ctx | ECDSA context |