#include <string.h>
#include "ec_lcl.h"
#include <openssl/err.h>
Go to the source code of this file.
|
EC_KEY * | EC_KEY_new (void) |
|
EC_KEY * | EC_KEY_new_by_curve_name (int nid) |
|
void | EC_KEY_free (EC_KEY *r) |
|
EC_KEY * | EC_KEY_copy (EC_KEY *dest, const EC_KEY *src) |
|
EC_KEY * | EC_KEY_dup (const EC_KEY *ec_key) |
|
int | EC_KEY_up_ref (EC_KEY *r) |
|
int | EC_KEY_generate_key (EC_KEY *eckey) |
|
int | EC_KEY_check_key (const EC_KEY *eckey) |
|
int | EC_KEY_set_public_key_affine_coordinates (EC_KEY *key, BIGNUM *x, BIGNUM *y) |
|
const EC_GROUP * | EC_KEY_get0_group (const EC_KEY *key) |
|
int | EC_KEY_set_group (EC_KEY *key, const EC_GROUP *group) |
|
const BIGNUM * | EC_KEY_get0_private_key (const EC_KEY *key) |
|
int | EC_KEY_set_private_key (EC_KEY *key, const BIGNUM *priv_key) |
|
const EC_POINT * | EC_KEY_get0_public_key (const EC_KEY *key) |
|
int | EC_KEY_set_public_key (EC_KEY *key, const EC_POINT *pub_key) |
|
unsigned int | EC_KEY_get_enc_flags (const EC_KEY *key) |
|
void | EC_KEY_set_enc_flags (EC_KEY *key, unsigned int flags) |
|
point_conversion_form_t | EC_KEY_get_conv_form (const EC_KEY *key) |
|
void | EC_KEY_set_conv_form (EC_KEY *key, point_conversion_form_t cform) |
|
void * | EC_KEY_get_key_method_data (EC_KEY *key, void *(*dup_func)(void *), void(*free_func)(void *), void(*clear_free_func)(void *)) |
|
void | EC_KEY_insert_key_method_data (EC_KEY *key, void *data, void *(*dup_func)(void *), void(*free_func)(void *), void(*clear_free_func)(void *)) |
|
void | EC_KEY_set_asn1_flag (EC_KEY *key, int flag) |
|
int | EC_KEY_precompute_mult (EC_KEY *key, BN_CTX *ctx) |
|
int | EC_KEY_get_flags (const EC_KEY *key) |
|
void | EC_KEY_set_flags (EC_KEY *key, int flags) |
|
void | EC_KEY_clear_flags (EC_KEY *key, int flags) |
|
int EC_KEY_check_key |
( |
const EC_KEY * |
key | ) |
|
Verifies that a private and/or public key is valid.
- Parameters
-
- Returns
- 1 on success and 0 otherwise.
Definition at line 304 of file ec_key.c.
void EC_KEY_clear_flags |
( |
EC_KEY * |
key, |
|
|
int |
flags |
|
) |
| |
Copies a EC_KEY object.
- Parameters
-
dst | destination EC_KEY object |
src | src EC_KEY object |
- Returns
- dst or NULL if an error occurred.
Definition at line 141 of file ec_key.c.
Creates a new EC_KEY object and copies the content from src to it.
- Parameters
-
src | the source EC_KEY object |
- Returns
- newly created EC_KEY object or NULL if an error occurred.
Definition at line 208 of file ec_key.c.
Frees a EC_KEY object.
- Parameters
-
key | EC_KEY object to be freed. |
Definition at line 108 of file ec_key.c.
int EC_KEY_generate_key |
( |
EC_KEY * |
key | ) |
|
Creates a new ec private (and optional a new public) key.
- Parameters
-
- Returns
- 1 on success and 0 if an error occurred.
Definition at line 237 of file ec_key.c.
Returns the EC_GROUP object of a EC_KEY object
- Parameters
-
- Returns
- the EC_GROUP object (possibly NULL).
Definition at line 459 of file ec_key.c.
Returns the private key of a EC_KEY object.
- Parameters
-
- Returns
- a BIGNUM with the private key (possibly NULL).
Definition at line 472 of file ec_key.c.
Returns the public key of a EC_KEY object.
- Parameters
-
- Returns
- a EC_POINT object with the public key (possibly NULL)
Definition at line 485 of file ec_key.c.
unsigned int EC_KEY_get_enc_flags |
( |
const EC_KEY * |
key | ) |
|
int EC_KEY_get_flags |
( |
const EC_KEY * |
key | ) |
|
Creates a new EC_KEY object.
- Returns
- EC_KEY object or NULL if an error occurred.
Definition at line 71 of file ec_key.c.
EC_KEY* EC_KEY_new_by_curve_name |
( |
int |
nid | ) |
|
Creates a new EC_KEY object using a named curve as underlying EC_GROUP object.
- Parameters
-
nid | NID of the named curve. |
- Returns
- EC_KEY object or NULL if an error occurred.
Definition at line 94 of file ec_key.c.
Creates a table of pre-computed multiples of the generator to accelerate further EC_KEY operations.
- Parameters
-
key | EC_KEY object |
ctx | BN_CTX object (optional) |
- Returns
- 1 on success and 0 if an error occurred.
Definition at line 543 of file ec_key.c.
void EC_KEY_set_asn1_flag |
( |
EC_KEY * |
key, |
|
|
int |
flag |
|
) |
| |
void EC_KEY_set_enc_flags |
( |
EC_KEY * |
key, |
|
|
unsigned int |
flags |
|
) |
| |
Sets the EC_GROUP of a EC_KEY object.
- Parameters
-
key | EC_KEY object |
group | EC_GROUP to use in the EC_KEY object (note: the EC_KEY object will use an own copy of the EC_GROUP). |
- Returns
- 1 on success and 0 if an error occurred.
Definition at line 464 of file ec_key.c.
int EC_KEY_set_private_key |
( |
EC_KEY * |
key, |
|
|
const BIGNUM * |
prv |
|
) |
| |
Sets the private key of a EC_KEY object.
- Parameters
-
key | EC_KEY object |
prv | BIGNUM with the private key (note: the EC_KEY object will use an own copy of the BIGNUM). |
- Returns
- 1 on success and 0 if an error occurred.
Definition at line 477 of file ec_key.c.
Sets the public key of a EC_KEY object.
- Parameters
-
key | EC_KEY object |
pub | EC_POINT object with the public key (note: the EC_KEY object will use an own copy of the EC_POINT object). |
- Returns
- 1 on success and 0 if an error occurred.
Definition at line 490 of file ec_key.c.
Sets a public key from affine coordindates performing neccessary NIST PKV tests.
- Parameters
-
key | the EC_KEY object |
x | public key x coordinate |
y | public key y coordinate |
- Returns
- 1 on success and 0 otherwise.
Definition at line 383 of file ec_key.c.
int EC_KEY_up_ref |
( |
EC_KEY * |
key | ) |
|
Increases the internal reference count of a EC_KEY object.
- Parameters
-
- Returns
- 1 on success and 0 if an error occurred.
Definition at line 221 of file ec_key.c.