MPHELL
5.0.0
|
Tutorial for EC Korean Certificate DSA signature and verification using mphell. More...
#include <stdio.h>
#include "mphell/mphell.h"
Go to the source code of this file.
Data Structures | |
struct | eckcdsa_sig |
Define an ECKCDSA signature. More... | |
Typedefs | |
typedef struct eckcdsa_sig | eckcdsa_sig_t |
Define the ECKCDSA signature type. | |
typedef eckcdsa_sig_t | eckcdsa_sig[1] |
Pointer on an allocated eckcdsa_sig_t structure. | |
Functions | |
void | eckcdsa_sign_alloc (eckcdsa_sig *sig, uint8_t size) |
Allocate a signature structure. More... | |
void | eckcdsa_sign_free (eckcdsa_sig *sig) |
Free a used signature structure. More... | |
void | ec_point_mul_ecdsa (ec_point dst, number_srcptr u1, ec_point_srcptr G, number_srcptr u2, ec_point_srcptr key, ec_curve_srcptr E) |
void | eckcdsa_sign (unsigned char *hash, unsigned char *cert, eckcdsa_sig *sig, number priv_key, ec_curve *curve) |
int8_t | eckcdsa_verify (unsigned char *hash, unsigned char *cert, eckcdsa_sig *sig, ec_point *pub_key, ec_curve *curve) |
int8_t | eckcdsa_pub_key_validation (ec_point *pub_key, ec_curve *curve) |
Verify that the public key is valid (id est check taht pub_key belongs to the curve, that pub_key is not the neutral element and that pub_key is of ordre n) More... | |
int | main () |
Tutorial for EC Korean Certificate DSA signature and verification using mphell.
Definition in file mphell_tuto_eckcdsa.c.
Verify that the public key is valid (id est check taht pub_key belongs to the curve, that pub_key is not the neutral element and that pub_key is of ordre n)
hash | H(m) where H is a cryptographic hash function and m the message to sign. Must be written under hexadecimal form. ex: 64 hexadecimal characters for sha256. |
pub_key | Public key |
curve | Elliptic curve |
Definition at line 414 of file mphell_tuto_eckcdsa.c.
void eckcdsa_sign_alloc | ( | eckcdsa_sig * | sig, |
uint8_t | size | ||
) |
Allocate a signature structure.
sig | Signature |
size | Size (in block) of the signature |
Definition at line 78 of file mphell_tuto_eckcdsa.c.
void eckcdsa_sign_free | ( | eckcdsa_sig * | sig | ) |
Free a used signature structure.
sig | Signature |
Definition at line 98 of file mphell_tuto_eckcdsa.c.