blob: 86d7de77958c96f4ffff73abc8b29ab2cdf0774a [file] [log] [blame]
Adam Langley95c29f32014-06-20 12:00:00 -07001/* Originally written by Bodo Moeller for the OpenSSL project.
2 * ====================================================================
3 * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
15 * distribution.
16 *
17 * 3. All advertising materials mentioning features or use of this
18 * software must display the following acknowledgment:
19 * "This product includes software developed by the OpenSSL Project
20 * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21 *
22 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23 * endorse or promote products derived from this software without
24 * prior written permission. For written permission, please contact
25 * openssl-core@openssl.org.
26 *
27 * 5. Products derived from this software may not be called "OpenSSL"
28 * nor may "OpenSSL" appear in their names without prior written
29 * permission of the OpenSSL Project.
30 *
31 * 6. Redistributions of any form whatsoever must retain the following
32 * acknowledgment:
33 * "This product includes software developed by the OpenSSL Project
34 * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
35 *
36 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
37 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
40 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
42 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
45 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
47 * OF THE POSSIBILITY OF SUCH DAMAGE.
48 * ====================================================================
49 *
50 * This product includes cryptographic software written by Eric Young
51 * (eay@cryptsoft.com). This product includes software written by Tim
52 * Hudson (tjh@cryptsoft.com).
53 *
54 */
55/* ====================================================================
56 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
57 *
58 * Portions of the attached software ("Contribution") are developed by
59 * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
60 *
61 * The Contribution is licensed pursuant to the OpenSSL open source
62 * license provided above.
63 *
64 * The elliptic curve binary polynomial software is originally written by
65 * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems
66 * Laboratories. */
67
68#ifndef OPENSSL_HEADER_EC_H
69#define OPENSSL_HEADER_EC_H
70
71#include <openssl/base.h>
72
73#if defined(__cplusplus)
74extern "C" {
75#endif
76
77
David Benjamin5b082e82014-12-26 00:54:52 -050078/* Low-level operations on elliptic curves. */
79
80
Adam Langley95c29f32014-06-20 12:00:00 -070081typedef struct ec_group_st EC_GROUP;
82typedef struct ec_point_st EC_POINT;
83
84/** Enum for the point conversion form as defined in X9.62 (ECDSA)
85 * for the encoding of a elliptic curve point (x,y) */
86typedef enum {
87 /** the point is encoded as z||x, where the octet z specifies
88 * which solution of the quadratic equation y is */
89 POINT_CONVERSION_COMPRESSED = 2,
90 /** the point is encoded as z||x||y, where z is the octet 0x02 */
Håvard Molland306e5202014-12-08 15:41:59 +010091 POINT_CONVERSION_UNCOMPRESSED = 4
Adam Langley95c29f32014-06-20 12:00:00 -070092} point_conversion_form_t;
93
94
95/* Elliptic curve groups. */
96
97/* EC_GROUP_new_by_curve_name returns a fresh EC_GROUP object for the elliptic
98 * curve specified by |nid|, or NULL on error.
99 *
100 * The supported NIDs are:
101 * NID_secp224r1,
102 * NID_X9_62_prime256v1,
103 * NID_secp384r1,
104 * NID_secp521r1 */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700105OPENSSL_EXPORT EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
Adam Langley95c29f32014-06-20 12:00:00 -0700106
107/* EC_GROUP_free frees |group| and the data that it points to. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700108OPENSSL_EXPORT void EC_GROUP_free(EC_GROUP *group);
Adam Langley95c29f32014-06-20 12:00:00 -0700109
110/* EC_GROUP_copy sets |*dest| equal to |*src|. It returns one on success and
111 * zero otherwise. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700112OPENSSL_EXPORT int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src);
Adam Langley95c29f32014-06-20 12:00:00 -0700113
114/* EC_GROUP_dup returns a fresh |EC_GROUP| which is equal to |a| or NULL on
115 * error. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700116OPENSSL_EXPORT EC_GROUP *EC_GROUP_dup(const EC_GROUP *a);
Adam Langley95c29f32014-06-20 12:00:00 -0700117
118/* EC_GROUP_cmp returns one if |a| and |b| are the same group and zero
119 * otherwise. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700120OPENSSL_EXPORT int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b);
Adam Langley95c29f32014-06-20 12:00:00 -0700121
122/* EC_GROUP_get0_generator returns a pointer to the internal |EC_POINT| object
123 * in |group| that specifies the generator for the group. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700124OPENSSL_EXPORT const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
Adam Langley95c29f32014-06-20 12:00:00 -0700125
David Benjaminb145c812014-11-10 17:06:33 -0500126/* EC_GROUP_get_order sets |*order| to the order of |group|, if it's not
127 * NULL. It returns one on success and zero otherwise. |ctx| is ignored. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700128OPENSSL_EXPORT int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order,
129 BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700130
131/* EC_GROUP_get_cofactor sets |*cofactor| to the cofactor of |group| using
132 * |ctx|, if it's not NULL. It returns one on success and zero otherwise. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700133OPENSSL_EXPORT int EC_GROUP_get_cofactor(const EC_GROUP *group,
134 BIGNUM *cofactor, BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700135
Adam Langley0eb1aae2014-08-22 12:24:16 -0700136/* EC_GROUP_get_curve_GFp gets various parameters about a group. It sets
137 * |*out_p| to the order of the coordinate field and |*out_a| and |*out_b| to
138 * the parameters of the curve when expressed as y² = x³ + ax + b. Any of the
139 * output parameters can be NULL. It returns one on success and zero on
140 * error. */
141OPENSSL_EXPORT int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *out_p,
142 BIGNUM *out_a, BIGNUM *out_b,
143 BN_CTX *ctx);
144
Adam Langley95c29f32014-06-20 12:00:00 -0700145/* EC_GROUP_get_curve_name returns a NID that identifies |group|. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700146OPENSSL_EXPORT int EC_GROUP_get_curve_name(const EC_GROUP *group);
Adam Langley95c29f32014-06-20 12:00:00 -0700147
148/* EC_GROUP_get_degree returns the number of bits needed to represent an
149 * element of the field underlying |group|. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700150OPENSSL_EXPORT int EC_GROUP_get_degree(const EC_GROUP *group);
Adam Langley95c29f32014-06-20 12:00:00 -0700151
Adam Langley95c29f32014-06-20 12:00:00 -0700152/* EC_GROUP_precompute_mult precomputes multiplies of the generator in order to
153 * speed up operations that involve calculating generator multiples. It returns
154 * one on sucess and zero otherwise. If |ctx| is not NULL, it may be used. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700155OPENSSL_EXPORT int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700156
157/* EC_GROUP_have_precompute_mult returns one if |group| contains precomputed
158 * generator multiples. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700159OPENSSL_EXPORT int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
Adam Langley95c29f32014-06-20 12:00:00 -0700160
161
162/* Points on elliptic curves. */
163
164/* EC_POINT_new returns a fresh |EC_POINT| object in the given group, or NULL
165 * on error. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700166OPENSSL_EXPORT EC_POINT *EC_POINT_new(const EC_GROUP *group);
Adam Langley95c29f32014-06-20 12:00:00 -0700167
168/* EC_POINT_free frees |point| and the data that it points to. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700169OPENSSL_EXPORT void EC_POINT_free(EC_POINT *point);
Adam Langley95c29f32014-06-20 12:00:00 -0700170
171/* EC_POINT_clear_free clears the data that |point| points to, frees it and
172 * then frees |point| itself. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700173OPENSSL_EXPORT void EC_POINT_clear_free(EC_POINT *point);
Adam Langley95c29f32014-06-20 12:00:00 -0700174
175/* EC_POINT_copy sets |*dest| equal to |*src|. It returns one on success and
176 * zero otherwise. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700177OPENSSL_EXPORT int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src);
Adam Langley95c29f32014-06-20 12:00:00 -0700178
179/* EC_POINT_dup returns a fresh |EC_POINT| that contains the same values as
180 * |src|, or NULL on error. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700181OPENSSL_EXPORT EC_POINT *EC_POINT_dup(const EC_POINT *src,
182 const EC_GROUP *group);
Adam Langley95c29f32014-06-20 12:00:00 -0700183
184/* EC_POINT_set_to_infinity sets |point| to be the "point at infinity" for the
185 * given group. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700186OPENSSL_EXPORT int EC_POINT_set_to_infinity(const EC_GROUP *group,
187 EC_POINT *point);
Adam Langley95c29f32014-06-20 12:00:00 -0700188
189/* EC_POINT_is_at_infinity returns one iff |point| is the point at infinity and
190 * zero otherwise. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700191OPENSSL_EXPORT int EC_POINT_is_at_infinity(const EC_GROUP *group,
192 const EC_POINT *point);
Adam Langley95c29f32014-06-20 12:00:00 -0700193
194/* EC_POINT_is_on_curve returns one if |point| is an element of |group| and
195 * zero otheriwse. If |ctx| is non-NULL, it may be used. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700196OPENSSL_EXPORT int EC_POINT_is_on_curve(const EC_GROUP *group,
197 const EC_POINT *point, BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700198
199/* EC_POINT_cmp returns zero if |a| is equal to |b|, greater than zero is
200 * non-equal and -1 on error. If |ctx| is not NULL, it may be used. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700201OPENSSL_EXPORT int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a,
202 const EC_POINT *b, BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700203
204/* EC_POINT_make_affine converts |point| to affine form, internally. It returns
205 * one on success and zero otherwise. If |ctx| is not NULL, it may be used. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700206OPENSSL_EXPORT int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point,
207 BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700208
209/* EC_POINTs_make_affine converts |num| points from |points| to affine form,
210 * internally. It returns one on success and zero otherwise. If |ctx| is not
211 * NULL, it may be used. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700212OPENSSL_EXPORT int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
213 EC_POINT *points[], BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700214
215
216/* Point conversion. */
217
218/* EC_POINT_get_affine_coordinates_GFp sets |x| and |y| to the affine value of
219 * |point| using |ctx|, if it's not NULL. It returns one on success and zero
220 * otherwise. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700221OPENSSL_EXPORT int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
222 const EC_POINT *point,
223 BIGNUM *x, BIGNUM *y,
224 BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700225
226/* EC_POINT_set_affine_coordinates sets the value of |p| to be (|x|, |y|). The
227 * |ctx| argument may be used if not NULL. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700228OPENSSL_EXPORT int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group,
229 EC_POINT *point,
230 const BIGNUM *x,
231 const BIGNUM *y,
232 BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700233
234/* EC_POINT_point2oct serialises |point| into the X9.62 form given by |form|
235 * into, at most, |len| bytes at |buf|. It returns the number of bytes written
236 * or zero on error if |buf| is non-NULL, else the number of bytes needed. The
237 * |ctx| argument may be used if not NULL. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700238OPENSSL_EXPORT size_t EC_POINT_point2oct(const EC_GROUP *group,
239 const EC_POINT *point,
240 point_conversion_form_t form,
241 uint8_t *buf, size_t len, BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700242
243/* EC_POINT_oct2point sets |point| from |len| bytes of X9.62 format
244 * serialisation in |buf|. It returns one on success and zero otherwise. The
245 * |ctx| argument may be used if not NULL. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700246OPENSSL_EXPORT int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point,
247 const uint8_t *buf, size_t len,
248 BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700249
250/* EC_POINT_set_compressed_coordinates_GFp sets |point| to equal the point with
251 * the given |x| coordinate and the y coordinate specified by |y_bit| (see
252 * X9.62). It returns one on success and zero otherwise. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700253OPENSSL_EXPORT int EC_POINT_set_compressed_coordinates_GFp(
254 const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, int y_bit,
255 BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700256
257
258/* Group operations. */
259
260/* EC_POINT_add sets |r| equal to |a| plus |b|. It returns one on success and
261 * zero otherwise. If |ctx| is not NULL, it may be used. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700262OPENSSL_EXPORT int EC_POINT_add(const EC_GROUP *group, EC_POINT *r,
263 const EC_POINT *a, const EC_POINT *b,
264 BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700265
266/* EC_POINT_dbl sets |r| equal to |a| plus |a|. It returns one on success and
267 * zero otherwise. If |ctx| is not NULL, it may be used. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700268OPENSSL_EXPORT int EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r,
269 const EC_POINT *a, BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700270
271/* EC_POINT_dbl sets |a| equal to minus |a|. It returns one on success and zero
272 * otherwise. If |ctx| is not NULL, it may be used. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700273OPENSSL_EXPORT int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a,
274 BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700275
276/* EC_POINT_mul sets r = generator*n + q*m. It returns one on success and zero
277 * otherwise. If |ctx| is not NULL, it may be used. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700278OPENSSL_EXPORT int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r,
279 const BIGNUM *n, const EC_POINT *q,
280 const BIGNUM *m, BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700281
282/* EC_POINTs_mul sets r = generator*n + sum(p[i]*m[i]). It returns one on
283 * success and zero otherwise. If |ctx| is not NULL, it may be used. */
Adam Langleyeb7d2ed2014-07-30 16:02:14 -0700284OPENSSL_EXPORT int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r,
285 const BIGNUM *n, size_t num,
286 const EC_POINT *p[], const BIGNUM *m[],
287 BN_CTX *ctx);
Adam Langley95c29f32014-06-20 12:00:00 -0700288
289
290/* Old code expects to get EC_KEY from ec.h. */
291#if !defined(OPENSSL_HEADER_EC_KEY_H)
292#include <openssl/ec_key.h>
293#endif
294
295
296#if defined(__cplusplus)
297} /* extern C */
298#endif
299
300#define EC_F_ec_pre_comp_new 100
301#define EC_F_ec_GFp_mont_field_decode 101
302#define EC_F_ec_group_new_from_data 102
303#define EC_F_ec_GFp_simple_point_get_affine_coordinates 103
304#define EC_F_ec_GFp_simple_make_affine 104
305#define EC_F_EC_KEY_new_method 105
306#define EC_F_ec_GFp_mont_field_encode 106
307#define EC_F_EC_GROUP_new_by_curve_name 107
308#define EC_F_ec_group_new 108
309#define EC_F_ec_asn1_group2pkparameters 109
310#define EC_F_EC_POINT_set_compressed_coordinates_GFp 110
311#define EC_F_ec_GFp_mont_field_sqr 111
312#define EC_F_EC_POINT_make_affine 112
313#define EC_F_i2d_ECParameters 113
314#define EC_F_ec_wNAF_mul 114
315#define EC_F_EC_GROUP_copy 115
316#define EC_F_EC_POINT_cmp 116
317#define EC_F_ec_GFp_mont_field_mul 117
318#define EC_F_EC_POINT_dup 118
319#define EC_F_EC_POINT_invert 119
320#define EC_F_ec_GFp_simple_point_set_affine_coordinates 120
321#define EC_F_ec_GFp_simple_points_make_affine 121
322#define EC_F_i2o_ECPublicKey 122
323#define EC_F_EC_KEY_check_key 123
324#define EC_F_ec_wNAF_precompute_mult 124
325#define EC_F_EC_POINT_oct2point 125
326#define EC_F_EC_POINT_is_at_infinity 126
327#define EC_F_EC_POINT_get_affine_coordinates_GFp 127
328#define EC_F_ec_point_set_Jprojective_coordinates_GFp 128
329#define EC_F_o2i_ECPublicKey 129
330#define EC_F_ec_GFp_mont_field_set_to_one 130
331#define EC_F_ec_group_new_curve_GFp 131
332#define EC_F_EC_POINT_dbl 132
333#define EC_F_ec_asn1_pkparameters2group 133
334#define EC_F_i2d_ECPKParameters 134
335#define EC_F_EC_KEY_copy 135
336#define EC_F_EC_POINT_new 136
337#define EC_F_EC_POINT_point2oct 137
338#define EC_F_EC_POINT_copy 138
339#define EC_F_EC_POINT_is_on_curve 139
340#define EC_F_ec_GFp_simple_group_set_curve 140
341#define EC_F_i2d_ECPrivateKey 141
342#define EC_F_d2i_ECParameters 142
343#define EC_F_ec_GFp_mont_group_set_curve 143
344#define EC_F_EC_POINT_set_to_infinity 144
345#define EC_F_EC_POINTs_make_affine 145
346#define EC_F_compute_wNAF 146
347#define EC_F_ec_GFp_simple_point2oct 147
348#define EC_F_EC_GROUP_get_degree 148
349#define EC_F_ec_GFp_simple_group_check_discriminant 149
350#define EC_F_d2i_ECPKParameters 150
351#define EC_F_d2i_ECPrivateKey 151
352#define EC_F_ec_GFp_simple_oct2point 152
353#define EC_F_EC_POINT_set_affine_coordinates_GFp 153
354#define EC_F_EC_KEY_set_public_key_affine_coordinates 154
355#define EC_F_EC_KEY_generate_key 155
356#define EC_F_ec_GFp_simple_set_compressed_coordinates 156
357#define EC_F_EC_POINT_add 157
Adam Langley0eb1aae2014-08-22 12:24:16 -0700358#define EC_F_EC_GROUP_get_curve_GFp 158
Adam Langley95c29f32014-06-20 12:00:00 -0700359#define EC_R_PKPARAMETERS2GROUP_FAILURE 100
360#define EC_R_NON_NAMED_CURVE 101
361#define EC_R_COORDINATES_OUT_OF_RANGE 102
362#define EC_R_POINT_AT_INFINITY 103
363#define EC_R_NOT_INITIALIZED 104
364#define EC_R_MISSING_PRIVATE_KEY 105
365#define EC_R_GROUP2PKPARAMETERS_FAILURE 106
366#define EC_R_INVALID_ENCODING 107
367#define EC_R_BUFFER_TOO_SMALL 108
368#define EC_R_D2I_ECPKPARAMETERS_FAILURE 109
369#define EC_R_INVALID_FORM 110
370#define EC_R_INVALID_PRIVATE_KEY 111
371#define EC_R_INVALID_COMPRESSED_POINT 112
372#define EC_R_MISSING_PARAMETERS 113
373#define EC_R_INVALID_FIELD 114
374#define EC_R_INVALID_COMPRESSION_BIT 115
375#define EC_R_GF2M_NOT_SUPPORTED 116
376#define EC_R_POINT_IS_NOT_ON_CURVE 117
377#define EC_R_UNKNOWN_ORDER 118
378#define EC_R_UNKNOWN_GROUP 119
379#define EC_R_WRONG_ORDER 120
380#define EC_R_UNDEFINED_GENERATOR 121
381#define EC_R_INCOMPATIBLE_OBJECTS 122
382#define EC_R_I2D_ECPKPARAMETERS_FAILURE 123
383#define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 124
384#define EC_R_INVALID_GROUP_ORDER 125
385#define EC_R_SLOT_FULL 126
386
387#endif /* OPENSSL_HEADER_EC_H */