summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/ec/ec_lib.c')
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c
index 7e0ea017f9..bf2f652fc7 100644
--- a/src/lib/libcrypto/ec/ec_lib.c
+++ b/src/lib/libcrypto/ec/ec_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_lib.c,v 1.29 2018/07/16 17:32:39 tb Exp $ */ 1/* $OpenBSD: ec_lib.c,v 1.30 2018/11/05 20:18:21 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 */
@@ -533,6 +533,23 @@ EC_GROUP_cmp(const EC_GROUP * a, const EC_GROUP * b, BN_CTX * ctx)
533 return -1; 533 return -1;
534} 534}
535 535
536/*
537 * Coordinate blinding for EC_POINT.
538 *
539 * The underlying EC_METHOD can optionally implement this function:
540 * underlying implementations should return 0 on errors, or 1 on success.
541 *
542 * This wrapper returns 1 in case the underlying EC_METHOD does not support
543 * coordinate blinding.
544 */
545int
546ec_point_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx)
547{
548 if (group->meth->blind_coordinates == NULL)
549 return 1;
550
551 return group->meth->blind_coordinates(group, p, ctx);
552}
536 553
537/* this has 'package' visibility */ 554/* this has 'package' visibility */
538int 555int