Skip to content

Commit

Permalink
Expose EC_POINT_{get,set}_affine_coordinates(3) and
Browse files Browse the repository at this point in the history
EC_POINT_set_compressed_coordinates(3)

ok jsing
  • Loading branch information
botovq committed May 10, 2021
1 parent ab2cd7b commit ec67d97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions lib/libcrypto/Symbols.list
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,7 @@ EC_POINT_dbl
EC_POINT_dup
EC_POINT_free
EC_POINT_get_Jprojective_coordinates_GFp
EC_POINT_get_affine_coordinates
EC_POINT_get_affine_coordinates_GF2m
EC_POINT_get_affine_coordinates_GFp
EC_POINT_hex2point
Expand All @@ -1145,8 +1146,10 @@ EC_POINT_point2bn
EC_POINT_point2hex
EC_POINT_point2oct
EC_POINT_set_Jprojective_coordinates_GFp
EC_POINT_set_affine_coordinates
EC_POINT_set_affine_coordinates_GF2m
EC_POINT_set_affine_coordinates_GFp
EC_POINT_set_compressed_coordinates
EC_POINT_set_compressed_coordinates_GF2m
EC_POINT_set_compressed_coordinates_GFp
EC_POINT_set_to_infinity
Expand Down
15 changes: 8 additions & 7 deletions lib/libcrypto/ec/ec.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ec.h,v 1.23 2021/05/10 16:55:19 tb Exp $ */
/* $OpenBSD: ec.h,v 1.24 2021/05/10 16:58:19 tb Exp $ */
/*
* Originally written by Bodo Moeller for the OpenSSL project.
*/
Expand Down Expand Up @@ -453,19 +453,20 @@ const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
*/
int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);

#if defined(LIBRESSL_INTERNAL)

int EC_POINT_set_Jprojective_coordinates(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx);
int EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group,
const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx);
int EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p,
BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, int y_bit, BN_CTX *ctx);

#if defined(LIBRESSL_INTERNAL)

int EC_POINT_set_Jprojective_coordinates(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx);
int EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group,
const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx);

#else

/** Sets the jacobian projective coordinates of a EC_POINT over GFp
Expand Down

0 comments on commit ec67d97

Please sign in to comment.