summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_local.h
diff options
context:
space:
mode:
authortb <>2024-11-30 21:09:59 +0000
committertb <>2024-11-30 21:09:59 +0000
commit07c8646d26fc16dffec24d00b748fd0c79737e40 (patch)
tree6ae3aed64b6827756f2a5efd89b1c53c99db42c5 /src/lib/libcrypto/ec/ec_local.h
parent529820265bc18529d80625ea64a94b5502e646aa (diff)
downloadopenbsd-07c8646d26fc16dffec24d00b748fd0c79737e40.tar.gz
openbsd-07c8646d26fc16dffec24d00b748fd0c79737e40.tar.bz2
openbsd-07c8646d26fc16dffec24d00b748fd0c79737e40.zip
Inline trivial EC point methods
Like most of the "group" methods these are shared between Montgomery curves and simple curves. There's no point in five methods hanging off the EC_METHODS struct whne they can just as well be inlined in the public API. It makes all files involved shorter... ok jsing
Diffstat (limited to 'src/lib/libcrypto/ec/ec_local.h')
-rw-r--r--src/lib/libcrypto/ec/ec_local.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/lib/libcrypto/ec/ec_local.h b/src/lib/libcrypto/ec/ec_local.h
index 5d1909db03..11cc36cf67 100644
--- a/src/lib/libcrypto/ec/ec_local.h
+++ b/src/lib/libcrypto/ec/ec_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_local.h,v 1.39 2024/11/22 12:14:41 tb Exp $ */ 1/* $OpenBSD: ec_local.h,v 1.40 2024/11/30 21:09:59 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 */
@@ -101,11 +101,6 @@ struct ec_method_st {
101 int (*group_order_bits)(const EC_GROUP *); 101 int (*group_order_bits)(const EC_GROUP *);
102 int (*group_check_discriminant)(const EC_GROUP *, BN_CTX *); 102 int (*group_check_discriminant)(const EC_GROUP *, BN_CTX *);
103 103
104 int (*point_init)(EC_POINT *);
105 void (*point_finish)(EC_POINT *);
106 int (*point_copy)(EC_POINT *, const EC_POINT *);
107
108 int (*point_set_to_infinity)(const EC_GROUP *, EC_POINT *);
109 int (*point_set_Jprojective_coordinates)(const EC_GROUP *, EC_POINT *, 104 int (*point_set_Jprojective_coordinates)(const EC_GROUP *, EC_POINT *,
110 const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *); 105 const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *);
111 int (*point_get_Jprojective_coordinates)(const EC_GROUP *, 106 int (*point_get_Jprojective_coordinates)(const EC_GROUP *,
@@ -122,7 +117,6 @@ struct ec_method_st {
122 int (*dbl)(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *); 117 int (*dbl)(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *);
123 int (*invert)(const EC_GROUP *, EC_POINT *, BN_CTX *); 118 int (*invert)(const EC_GROUP *, EC_POINT *, BN_CTX *);
124 119
125 int (*is_at_infinity)(const EC_GROUP *, const EC_POINT *);
126 int (*is_on_curve)(const EC_GROUP *, const EC_POINT *, BN_CTX *); 120 int (*is_on_curve)(const EC_GROUP *, const EC_POINT *, BN_CTX *);
127 int (*point_cmp)(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b, 121 int (*point_cmp)(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b,
128 BN_CTX *); 122 BN_CTX *);
@@ -140,10 +134,6 @@ struct ec_method_st {
140 const EC_POINT *point, BN_CTX *); 134 const EC_POINT *point, BN_CTX *);
141 135
142 /* 136 /*
143 * Internal methods.
144 */
145
146 /*
147 * These can be used by 'add' and 'dbl' so that the same implementations 137 * These can be used by 'add' and 'dbl' so that the same implementations
148 * of point operations can be used with different optimized versions of 138 * of point operations can be used with different optimized versions of
149 * expensive field operations. 139 * expensive field operations.