OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
ec_oct.c File Reference
#include <string.h>
#include <openssl/err.h>
#include <openssl/opensslv.h>
#include "ec_lcl.h"

Go to the source code of this file.

Functions

int EC_POINT_set_compressed_coordinates_GFp (const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, int y_bit, BN_CTX *ctx)
 
int EC_POINT_set_compressed_coordinates_GF2m (const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, int y_bit, BN_CTX *ctx)
 
size_t EC_POINT_point2oct (const EC_GROUP *group, const EC_POINT *point, point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *ctx)
 
int EC_POINT_oct2point (const EC_GROUP *group, EC_POINT *point, const unsigned char *buf, size_t len, BN_CTX *ctx)
 

Function Documentation

int EC_POINT_oct2point ( const EC_GROUP group,
EC_POINT p,
const unsigned char *  buf,
size_t  len,
BN_CTX ctx 
)

Decodes a EC_POINT from a octet string

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
bufmemory buffer with the encoded ec point
lenlength of the encoded ec point
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 167 of file ec_oct.c.

size_t EC_POINT_point2oct ( const EC_GROUP group,
const EC_POINT p,
point_conversion_form_t  form,
unsigned char *  buf,
size_t  len,
BN_CTX ctx 
)

Encodes a EC_POINT object to a octet string

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
formpoint conversion form
bufmemory buffer for the result. If NULL the function returns required buffer size.
lenlength of the memory buffer
ctxBN_CTX object (optional)
Returns
the length of the encoded octet string or 0 if an error occurred

Definition at line 132 of file ec_oct.c.

int EC_POINT_set_compressed_coordinates_GF2m ( const EC_GROUP group,
EC_POINT p,
const BIGNUM x,
int  y_bit,
BN_CTX ctx 
)

Sets the x9.62 compressed coordinates of a EC_POINT over GF2m

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM with x-coordinate
y_bitinteger with the y-Bit (either 0 or 1)
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 105 of file ec_oct.c.

int EC_POINT_set_compressed_coordinates_GFp ( const EC_GROUP group,
EC_POINT p,
const BIGNUM x,
int  y_bit,
BN_CTX ctx 
)

Sets the x9.62 compressed coordinates of a EC_POINT over GFp

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM with x-coordinate
y_bitinteger with the y-Bit (either 0 or 1)
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 71 of file ec_oct.c.