diff options
| author | tb <> | 2021-04-20 17:16:38 +0000 |
|---|---|---|
| committer | tb <> | 2021-04-20 17:16:38 +0000 |
| commit | d75ea39a8c50b617300b7a60e480697c35a01086 (patch) | |
| tree | 5887c8db20a9739a2d144ce6d009f6f18b6f49f1 /src/lib/libcrypto/ec/ec.h | |
| parent | 33dd5ee78e17ec0f81f5a608ab0f31511df7d6b3 (diff) | |
| download | openbsd-d75ea39a8c50b617300b7a60e480697c35a01086.tar.gz openbsd-d75ea39a8c50b617300b7a60e480697c35a01086.tar.bz2 openbsd-d75ea39a8c50b617300b7a60e480697c35a01086.zip | |
Prepare to provide EC_POINT_{g,s}et_affine_coordinates
Similar to part of OpenSSL commit 8e3cced75fb5fee5da59ebef9605d403a999391b
ok jsing
Diffstat (limited to 'src/lib/libcrypto/ec/ec.h')
| -rw-r--r-- | src/lib/libcrypto/ec/ec.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ec/ec.h b/src/lib/libcrypto/ec/ec.h index a6ae3e3ac3..ebd80b91fd 100644 --- a/src/lib/libcrypto/ec/ec.h +++ b/src/lib/libcrypto/ec/ec.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec.h,v 1.19 2021/04/20 17:04:13 tb Exp $ */ | 1 | /* $OpenBSD: ec.h,v 1.20 2021/04/20 17:16:37 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -478,6 +478,12 @@ int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, | |||
| 478 | int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | 478 | int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, |
| 479 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx); | 479 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx); |
| 480 | 480 | ||
| 481 | #if defined(LIBRESSL_INTERNAL) | ||
| 482 | int EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *p, | ||
| 483 | const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx); | ||
| 484 | int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p, | ||
| 485 | BIGNUM *x, BIGNUM *y, BN_CTX *ctx); | ||
| 486 | #else | ||
| 481 | /** Sets the affine coordinates of a EC_POINT over GFp | 487 | /** Sets the affine coordinates of a EC_POINT over GFp |
| 482 | * \param group underlying EC_GROUP object | 488 | * \param group underlying EC_GROUP object |
| 483 | * \param p EC_POINT object | 489 | * \param p EC_POINT object |
| @@ -499,6 +505,7 @@ int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, | |||
| 499 | */ | 505 | */ |
| 500 | int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, | 506 | int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, |
| 501 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx); | 507 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx); |
| 508 | #endif | ||
| 502 | 509 | ||
| 503 | /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp | 510 | /** Sets the x9.62 compressed coordinates of a EC_POINT over GFp |
| 504 | * \param group underlying EC_GROUP object | 511 | * \param group underlying EC_GROUP object |
| @@ -510,7 +517,9 @@ int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, | |||
| 510 | */ | 517 | */ |
| 511 | int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, | 518 | int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *p, |
| 512 | const BIGNUM *x, int y_bit, BN_CTX *ctx); | 519 | const BIGNUM *x, int y_bit, BN_CTX *ctx); |
| 520 | |||
| 513 | #ifndef OPENSSL_NO_EC2M | 521 | #ifndef OPENSSL_NO_EC2M |
| 522 | #if !defined(LIBRESSL_INTERNAL) | ||
| 514 | /** Sets the affine coordinates of a EC_POINT over GF2m | 523 | /** Sets the affine coordinates of a EC_POINT over GF2m |
| 515 | * \param group underlying EC_GROUP object | 524 | * \param group underlying EC_GROUP object |
| 516 | * \param p EC_POINT object | 525 | * \param p EC_POINT object |
| @@ -532,6 +541,7 @@ int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p, | |||
| 532 | */ | 541 | */ |
| 533 | int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group, | 542 | int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group, |
| 534 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx); | 543 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx); |
| 544 | #endif | ||
| 535 | 545 | ||
| 536 | /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m | 546 | /** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m |
| 537 | * \param group underlying EC_GROUP object | 547 | * \param group underlying EC_GROUP object |
