ECP group structure. More...
#include <ecp.h>

Data Fields | |
| ecp_group_id | id |
| mpi | P |
| mpi | A |
| mpi | B |
| ecp_point | G |
| mpi | N |
| size_t | pbits |
| size_t | nbits |
| unsigned int | h |
| int(* | modp )(mpi *) |
| int(* | t_pre )(ecp_point *, void *) |
| int(* | t_post )(ecp_point *, void *) |
| void * | t_data |
| ecp_point * | T |
| size_t | T_size |
ECP group structure.
The curves we consider are defined by y^2 = x^3 + A x + B mod P, and a generator for a large subgroup of order N is fixed.
pbits and nbits must be the size of P and N in bits.
If modp is NULL, reduction modulo P is done using a generic algorithm. Otherwise, it must point to a function that takes an mpi in the range 0..2^(2*pbits)-1 and transforms it in-place in an integer of little more than pbits, so that the integer may be efficiently brought in the 0..P-1 range by a few additions or substractions. It must return 0 on success and non-zero on failure.
Definition at line 117 of file ecp.h.
linear term in the equation
Definition at line 121 of file ecp.h.
Referenced by ecp_check_pubkey(), ecp_double_jac(), ecp_group_free(), ecp_group_read_string(), and ecp_group_read_string_gen().
constant term in the equation
Definition at line 122 of file ecp.h.
Referenced by ecp_check_pubkey(), ecp_group_free(), and ecp_group_read_string_gen().
generator of the subgroup used
Definition at line 123 of file ecp.h.
Referenced by ecdsa_verify(), ecp_gen_keypair(), ecp_group_free(), ecp_group_read_string_gen(), ecp_mul(), ecp_self_test(), and pk_parse_key_sec1_der().
| unsigned int ecp_group::h |
internal group identifier
Definition at line 119 of file ecp.h.
Referenced by ecp_group_copy(), ecp_tls_write_group(), ecp_use_known_dp(), pk_use_ecparams(), and pk_write_ec_param().
| int(* ecp_group::modp)(mpi *) |
function for fast reduction mod P
Referenced by ecp_modp(), and ecp_use_known_dp().
the order of G
Definition at line 124 of file ecp.h.
Referenced by ecdsa_sign(), ecdsa_verify(), ecp_check_privkey(), ecp_gen_keypair(), ecp_group_free(), and ecp_group_read_string_gen().
| size_t ecp_group::nbits |
number of bits in N
Definition at line 126 of file ecp.h.
Referenced by derive_mpi(), ecdh_calc_secret(), ecp_gen_keypair(), ecp_group_read_string_gen(), ecp_mul(), ssl_parse_server_ecdh_params(), and ssl_write_server_key_exchange().
prime modulus of the base field
Definition at line 120 of file ecp.h.
Referenced by ecp_add_mixed(), ecp_check_pubkey(), ecp_group_free(), ecp_group_read_string(), ecp_group_read_string_gen(), ecp_modp(), ecp_normalize(), ecp_normalize_many(), ecp_point_read_binary(), ecp_point_write_binary(), ecp_randomize_coordinates(), and ssl_parse_client_key_exchange().
| size_t ecp_group::pbits |
number of bits in P
Definition at line 125 of file ecp.h.
Referenced by ecdh_make_params(), ecdh_make_public(), ecp_group_read_string_gen(), ecp_modp(), and ecp_randomize_coordinates().
pre-computed points for ecp_mul()
Definition at line 132 of file ecp.h.
Referenced by ecp_group_free(), and ecp_mul().
| void* ecp_group::t_data |
| int(* ecp_group::t_post)(ecp_point *, void *) |
currently unused
| int(* ecp_group::t_pre)(ecp_point *, void *) |
currently unused
| size_t ecp_group::T_size |
number for pre-computed points
Definition at line 133 of file ecp.h.
Referenced by ecp_group_free(), and ecp_mul().
1.6.1