]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/ec/ec.h
move ECC ASN1 that is not specific to ECDSA into crypto/ec/,
[thirdparty/openssl.git] / crypto / ec / ec.h
CommitLineData
65e81670
BM
1/* crypto/ec/ec.h */
2/* ====================================================================
af28dd6c 3 * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
6cc5e19d 4 *
65e81670
BM
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
6cc5e19d 8 *
65e81670
BM
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
6cc5e19d 11 *
65e81670
BM
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.
6cc5e19d 16 *
65e81670
BM
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).
6cc5e19d
BM
53 *
54 */
55
6cc5e19d
BM
56#ifndef HEADER_EC_H
57#define HEADER_EC_H
58
bb62a8b0 59#ifdef OPENSSL_NO_EC
37da54b1 60#error EC is disabled.
bb62a8b0
BM
61#endif
62
5acaa495 63#include <openssl/bn.h>
458c2917 64#include <openssl/asn1.h>
0e995464 65#include <openssl/symhacks.h>
6cc5e19d 66
65e81670
BM
67#ifdef __cplusplus
68extern "C" {
69#endif
6cc5e19d 70
6cc5e19d 71
3a12ce01 72typedef enum {
226cc7de 73 /* values as defined in X9.62 (ECDSA) and elsewhere */
3a12ce01
BM
74 POINT_CONVERSION_COMPRESSED = 2,
75 POINT_CONVERSION_UNCOMPRESSED = 4,
76 POINT_CONVERSION_HYBRID = 6
77} point_conversion_form_t;
78
79
80typedef struct ec_method_st EC_METHOD;
81
82typedef struct ec_group_st
83 /*
84 EC_METHOD *meth;
85 -- field definition
86 -- curve coefficients
87 -- optional generator with associated information (order, cofactor)
e3a4f8b8 88 -- optional extra data (TODO: precomputed table for fast computation of multiples of generator)
3a12ce01
BM
89 */
90 EC_GROUP;
91
92typedef struct ec_point_st EC_POINT;
93
94
95/* EC_METHODs for curves over GF(p).
96 * EC_GFp_simple_method provides the basis for the optimized methods.
97 */
3a12ce01
BM
98const EC_METHOD *EC_GFp_simple_method(void);
99const EC_METHOD *EC_GFp_mont_method(void);
8a2908a2 100#if 0
48fe4d62
BM
101const EC_METHOD *EC_GFp_recp_method(void); /* TODO */
102const EC_METHOD *EC_GFp_nist_method(void); /* TODO */
8a2908a2 103#endif
3a12ce01
BM
104
105
106EC_GROUP *EC_GROUP_new(const EC_METHOD *);
48fe4d62
BM
107void EC_GROUP_free(EC_GROUP *);
108void EC_GROUP_clear_free(EC_GROUP *);
109int EC_GROUP_copy(EC_GROUP *, const EC_GROUP *);
110
b6db386f 111const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *);
458c2917 112int EC_METHOD_get_field_type(const EC_METHOD *);
b6db386f
BM
113
114int EC_GROUP_set_generator(EC_GROUP *, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor);
115EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *);
116int EC_GROUP_get_order(const EC_GROUP *, BIGNUM *order, BN_CTX *);
117int EC_GROUP_get_cofactor(const EC_GROUP *, BIGNUM *cofactor, BN_CTX *);
118
945e15a2
BM
119void EC_GROUP_set_nid(EC_GROUP *, int);
120int EC_GROUP_get_nid(const EC_GROUP *);
121
48fe4d62 122
3a12ce01 123/* We don't have types for field specifications and field elements in general.
48fe4d62 124 * Otherwise we could declare
7d7db13e 125 * int EC_GROUP_set_curve(EC_GROUP *, .....);
3a12ce01 126 */
bb62a8b0 127int EC_GROUP_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
48fe4d62 128int EC_GROUP_get_curve_GFp(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *);
3a12ce01 129
af28dd6c
BM
130/* EC_GROUP_check() returns 1 if 'group' defines a valid group, 0 otherwise */
131int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
17d6bb81
BM
132/* EC_GROUP_check_discriminant() returns 1 if the discriminant of the
133 * elliptic curve is not zero, 0 otherwise */
134int EC_GROUP_check_discriminant(const EC_GROUP *, BN_CTX *);
945e15a2
BM
135
136/* EC_GROUP_new_GFp() calls EC_GROUP_new() and EC_GROUP_set_GFp()
137 * after choosing an appropriate EC_METHOD */
138EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
139
60d8bae3
BM
140/* EC_GROUP_new_by_nid() and EC_GROUP_new_by_name() also set
141 * generator and order */
9bc44854 142EC_GROUP *EC_GROUP_new_by_nid(int nid);
60d8bae3 143EC_GROUP *EC_GROUP_new_by_name(int name);
36c19463 144/* Currently valid arguments to EC_GROUP_new_by_name() */
945e15a2 145#define EC_GROUP_NO_CURVE 0
0ae1661b 146#define EC_GROUP_NIST_PRIME_192 NID_X9_62_prime192v1
36c19463 147#define EC_GROUP_NIST_PRIME_224 NID_secp224r1
0ae1661b 148#define EC_GROUP_NIST_PRIME_256 NID_X9_62_prime256v1
36c19463
BM
149#define EC_GROUP_NIST_PRIME_384 NID_secp384r1
150#define EC_GROUP_NIST_PRIME_521 NID_secp521r1
945e15a2
BM
151#define EC_GROUP_X9_62_PRIME_192V1 NID_X9_62_prime192v1
152#define EC_GROUP_X9_62_PRIME_192V2 NID_X9_62_prime192v2
153#define EC_GROUP_X9_62_PRIME_192V3 NID_X9_62_prime192v3
154#define EC_GROUP_X9_62_PRIME_239V1 NID_X9_62_prime239v1
155#define EC_GROUP_X9_62_PRIME_239V2 NID_X9_62_prime239v2
156#define EC_GROUP_X9_62_PRIME_239V3 NID_X9_62_prime239v3
157#define EC_GROUP_X9_62_PRIME_256V1 NID_X9_62_prime256v1
36c19463
BM
158#define EC_GROUP_SECG_PRIME_112R1 NID_secp112r1
159#define EC_GROUP_SECG_PRIME_112R2 NID_secp112r2
160#define EC_GROUP_SECG_PRIME_128R1 NID_secp128r1
161#define EC_GROUP_SECG_PRIME_128R2 NID_secp128r2
162#define EC_GROUP_SECG_PRIME_160K1 NID_secp160k1
163#define EC_GROUP_SECG_PRIME_160R1 NID_secp160r1
164#define EC_GROUP_SECG_PRIME_160R2 NID_secp160r2
165#define EC_GROUP_SECG_PRIME_192K1 NID_secp192k1
0ae1661b 166#define EC_GROUP_SECG_PRIME_192R1 NID_X9_62_prime192v1
36c19463
BM
167#define EC_GROUP_SECG_PRIME_224K1 NID_secp224k1
168#define EC_GROUP_SECG_PRIME_224R1 NID_secp224r1
169#define EC_GROUP_SECG_PRIME_256K1 NID_secp256k1
0ae1661b 170#define EC_GROUP_SECG_PRIME_256R1 NID_X9_62_prime256v1
36c19463
BM
171#define EC_GROUP_SECG_PRIME_384R1 NID_secp384r1
172#define EC_GROUP_SECG_PRIME_521R1 NID_secp521r1
af28dd6c
BM
173#define EC_GROUP_WTLS_6 NID_wap_wsg_idm_ecid_wtls6
174#define EC_GROUP_WTLS_7 NID_secp160r1
175#define EC_GROUP_WTLS_8 NID_wap_wsg_idm_ecid_wtls8
176#define EC_GROUP_WTLS_9 NID_wap_wsg_idm_ecid_wtls9
177#define EC_GROUP_WTLS_12 NID_secp224r1
945e15a2 178
3a12ce01
BM
179EC_POINT *EC_POINT_new(const EC_GROUP *);
180void EC_POINT_free(EC_POINT *);
0657bf9c 181void EC_POINT_clear_free(EC_POINT *);
7d7db13e 182int EC_POINT_copy(EC_POINT *, const EC_POINT *);
3a12ce01 183
48fe4d62
BM
184const EC_METHOD *EC_POINT_method_of(const EC_POINT *);
185
226cc7de 186int EC_POINT_set_to_infinity(const EC_GROUP *, EC_POINT *);
1d5bd6cf
BM
187int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *, EC_POINT *,
188 const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *);
189int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *, const EC_POINT *,
190 BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *);
226cc7de
BM
191int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *, EC_POINT *,
192 const BIGNUM *x, const BIGNUM *y, BN_CTX *);
193int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *, const EC_POINT *,
194 BIGNUM *x, BIGNUM *y, BN_CTX *);
1d5bd6cf
BM
195int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *, EC_POINT *,
196 const BIGNUM *x, int y_bit, BN_CTX *);
7d7db13e 197
5b438e9b 198size_t EC_POINT_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form,
7d7db13e
BM
199 unsigned char *buf, size_t len, BN_CTX *);
200int EC_POINT_oct2point(const EC_GROUP *, EC_POINT *,
201 const unsigned char *buf, size_t len, BN_CTX *);
202
6cbe6382
BM
203/* other interfaces to point2oct/oct2point: */
204BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
205 point_conversion_form_t form, BIGNUM *, BN_CTX *);
206EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
207 EC_POINT *, BN_CTX *);
208char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
209 point_conversion_form_t form, BN_CTX *);
210EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
211 EC_POINT *, BN_CTX *);
212
7d7db13e
BM
213int EC_POINT_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *);
214int EC_POINT_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *);
1d5bd6cf 215int EC_POINT_invert(const EC_GROUP *, EC_POINT *, BN_CTX *);
3a12ce01 216
5b438e9b
BM
217int EC_POINT_is_at_infinity(const EC_GROUP *, const EC_POINT *);
218int EC_POINT_is_on_curve(const EC_GROUP *, const EC_POINT *, BN_CTX *);
1d5bd6cf 219int EC_POINT_cmp(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b, BN_CTX *);
fb171e53 220
e869d4bd 221int EC_POINT_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *);
48fe4d62 222int EC_POINTs_make_affine(const EC_GROUP *, size_t num, EC_POINT *[], BN_CTX *);
fb171e53 223
3a12ce01 224
38374911
BM
225int EC_POINTs_mul(const EC_GROUP *, EC_POINT *r, const BIGNUM *, size_t num, const EC_POINT *[], const BIGNUM *[], BN_CTX *);
226int EC_POINT_mul(const EC_GROUP *, EC_POINT *r, const BIGNUM *, const EC_POINT *, const BIGNUM *, BN_CTX *);
194dd046 227int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *);
6cc5e19d 228
6cc5e19d
BM
229
230
458c2917
BM
231/* ASN1 stuff */
232#define OPENSSL_EC_EXPLICIT 0x001
233#define OPENSSL_EC_NAMED_CURVE 0x002
234#define OPENSSL_EC_COMPRESSED 0x010
235#define OPENSSL_EC_UNCOMPRESSED 0x020
236#define OPENSSL_EC_HYBRID 0x040
237
238typedef struct ec_parameters_st ECPARAMETERS;
239typedef struct ecpk_parameters_st ECPKPARAMETERS;
240
241DECLARE_ASN1_ITEM(ECPARAMETERS)
242DECLARE_ASN1_ITEM(ECPKPARAMETERS)
243DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPARAMETERS, ECPARAMETERS)
244DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS)
245
246EC_GROUP *EC_ASN1_pkparameters2group(const ECPKPARAMETERS *);
247ECPKPARAMETERS *EC_ASN1_group2pkparameters(const EC_GROUP *, ECPKPARAMETERS *);
248
249void EC_GROUP_set_asn1_flag(EC_GROUP *, int flag);
250int EC_GROUP_get_asn1_flag(const EC_GROUP *);
251
252EC_GROUP *d2i_ECParameters(EC_GROUP **, const unsigned char **in, long len);
253int i2d_ECParameters(const EC_GROUP *, unsigned char **out);
254
255EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
256int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
257
258
259
65e81670
BM
260/* BEGIN ERROR CODES */
261/* The following lines are auto generated by the script mkerr.pl. Any changes
262 * made after this point may be overwritten when the script is next run.
263 */
de10f690 264void ERR_load_EC_strings(void);
6cc5e19d 265
65e81670 266/* Error codes for the EC functions. */
6cc5e19d 267
65e81670 268/* Function codes. */
3ba1f111 269#define EC_F_COMPUTE_WNAF 143
458c2917
BM
270#define EC_F_D2I_ECDSAPARAMETERS 154
271#define EC_F_D2I_ECPARAMETERS 155
272#define EC_F_D2I_ECPKPARAMETERS 161
273#define EC_F_EC_ASN1_GROUP2CURVE 159
274#define EC_F_EC_ASN1_GROUP2FIELDID 156
275#define EC_F_EC_ASN1_GROUP2PARAMETERS 160
276#define EC_F_EC_ASN1_GROUP2PKPARAMETERS 162
277#define EC_F_EC_ASN1_PARAMETERS2GROUP 157
278#define EC_F_EC_ASN1_PKPARAMETERS2GROUP 163
156e8557
BM
279#define EC_F_EC_GFP_MONT_FIELD_DECODE 133
280#define EC_F_EC_GFP_MONT_FIELD_ENCODE 134
281#define EC_F_EC_GFP_MONT_FIELD_MUL 131
282#define EC_F_EC_GFP_MONT_FIELD_SQR 132
17d6bb81 283#define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 152
de10f690
BM
284#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP 100
285#define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR 101
286#define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 102
287#define EC_F_EC_GFP_SIMPLE_OCT2POINT 103
288#define EC_F_EC_GFP_SIMPLE_POINT2OCT 104
48fe4d62 289#define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 137
de10f690 290#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP 105
bb62a8b0
BM
291#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP 128
292#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP 129
af28dd6c 293#define EC_F_EC_GROUP_CHECK 150
17d6bb81 294#define EC_F_EC_GROUP_CHECK_DISCRIMINANT 153
de10f690 295#define EC_F_EC_GROUP_COPY 106
48fe4d62
BM
296#define EC_F_EC_GROUP_GET0_GENERATOR 139
297#define EC_F_EC_GROUP_GET_COFACTOR 140
bb62a8b0 298#define EC_F_EC_GROUP_GET_CURVE_GFP 130
de10f690 299#define EC_F_EC_GROUP_GET_EXTRA_DATA 107
48fe4d62 300#define EC_F_EC_GROUP_GET_ORDER 141
60d8bae3 301#define EC_F_EC_GROUP_GROUP2NID 147
de10f690 302#define EC_F_EC_GROUP_NEW 108
60d8bae3
BM
303#define EC_F_EC_GROUP_NEW_BY_NAME 144
304#define EC_F_EC_GROUP_NEW_BY_NID 146
305#define EC_F_EC_GROUP_NEW_GFP_FROM_HEX 148
194dd046 306#define EC_F_EC_GROUP_PRECOMPUTE_MULT 142
de10f690
BM
307#define EC_F_EC_GROUP_SET_CURVE_GFP 109
308#define EC_F_EC_GROUP_SET_EXTRA_DATA 110
309#define EC_F_EC_GROUP_SET_GENERATOR 111
48fe4d62
BM
310#define EC_F_EC_POINTS_MAKE_AFFINE 136
311#define EC_F_EC_POINTS_MUL 138
de10f690
BM
312#define EC_F_EC_POINT_ADD 112
313#define EC_F_EC_POINT_CMP 113
314#define EC_F_EC_POINT_COPY 114
315#define EC_F_EC_POINT_DBL 115
316#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 116
317#define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 117
318#define EC_F_EC_POINT_IS_AT_INFINITY 118
319#define EC_F_EC_POINT_IS_ON_CURVE 119
320#define EC_F_EC_POINT_MAKE_AFFINE 120
321#define EC_F_EC_POINT_NEW 121
322#define EC_F_EC_POINT_OCT2POINT 122
323#define EC_F_EC_POINT_POINT2OCT 123
324#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124
1d5bd6cf
BM
325#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 125
326#define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126
de10f690 327#define EC_F_EC_POINT_SET_TO_INFINITY 127
156e8557 328#define EC_F_GFP_MONT_GROUP_SET_CURVE_GFP 135
458c2917
BM
329#define EC_F_I2D_ECDSAPARAMETERS 158
330#define EC_F_I2D_ECPARAMETERS 164
331#define EC_F_I2D_ECPKPARAMETERS 165
6cc5e19d 332
65e81670 333/* Reason codes. */
458c2917
BM
334#define EC_R_ASN1_ERROR 130
335#define EC_R_ASN1_UNKNOWN_FIELD 131
226cc7de 336#define EC_R_BUFFER_TOO_SMALL 100
458c2917
BM
337#define EC_R_D2I_ECPARAMETERS_FAILURE 132
338#define EC_R_D2I_ECPKPARAMETERS_FAILURE 133
339#define EC_R_D2I_EC_PARAMETERS_FAILURE 123
af28dd6c 340#define EC_R_DISCRIMINANT_IS_ZERO 118
458c2917
BM
341#define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 124
342#define EC_R_GROUP2PARAMETERS_FAILURE 125
343#define EC_R_GROUP2PKPARAMETERS_FAILURE 134
344#define EC_R_I2D_ECPKPARAMETERS_FAILURE 135
345#define EC_R_I2D_EC_PARAMETERS_FAILURE 126
226cc7de 346#define EC_R_INCOMPATIBLE_OBJECTS 101
48fe4d62 347#define EC_R_INVALID_ARGUMENT 112
bb62a8b0
BM
348#define EC_R_INVALID_COMPRESSED_POINT 110
349#define EC_R_INVALID_COMPRESSION_BIT 109
226cc7de 350#define EC_R_INVALID_ENCODING 102
de10f690
BM
351#define EC_R_INVALID_FIELD 103
352#define EC_R_INVALID_FORM 104
af28dd6c 353#define EC_R_INVALID_GROUP_ORDER 119
458c2917
BM
354#define EC_R_MISSING_PARAMETERS 127
355#define EC_R_NOT_IMPLEMENTED 136
156e8557 356#define EC_R_NOT_INITIALIZED 111
de10f690 357#define EC_R_NO_SUCH_EXTRA_DATA 105
458c2917
BM
358#define EC_R_PARAMETERS2GROUP_FAILURE 128
359#define EC_R_PKPARAMETERS2GROUP_FAILURE 137
de10f690
BM
360#define EC_R_POINT_AT_INFINITY 106
361#define EC_R_POINT_IS_NOT_ON_CURVE 107
362#define EC_R_SLOT_FULL 108
6f8f4431 363#define EC_R_UNDEFINED_GENERATOR 113
af28dd6c 364#define EC_R_UNDEFINED_ORDER 122
945e15a2
BM
365#define EC_R_UNKNOWN_GROUP 116
366#define EC_R_UNKNOWN_NID 117
38374911 367#define EC_R_UNKNOWN_ORDER 114
458c2917 368#define EC_R_UNKNOWN_PARAMETERS_TYPE 129
6cc5e19d 369
65e81670
BM
370#ifdef __cplusplus
371}
372#endif
5acaa495 373#endif