]> git.ipfire.org Git - thirdparty/openssl.git/blame - crypto/ec/ec.h
Move zeroing from bn_expand_internal() to bn_expand2() so that it
[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)
5f3d6f70 89 -- ASN1 stuff
3a12ce01
BM
90 */
91 EC_GROUP;
92
93typedef struct ec_point_st EC_POINT;
94
95
96/* EC_METHODs for curves over GF(p).
97 * EC_GFp_simple_method provides the basis for the optimized methods.
98 */
3a12ce01
BM
99const EC_METHOD *EC_GFp_simple_method(void);
100const EC_METHOD *EC_GFp_mont_method(void);
8a2908a2 101#if 0
48fe4d62
BM
102const EC_METHOD *EC_GFp_recp_method(void); /* TODO */
103const EC_METHOD *EC_GFp_nist_method(void); /* TODO */
8a2908a2 104#endif
3a12ce01
BM
105
106
107EC_GROUP *EC_GROUP_new(const EC_METHOD *);
48fe4d62
BM
108void EC_GROUP_free(EC_GROUP *);
109void EC_GROUP_clear_free(EC_GROUP *);
110int EC_GROUP_copy(EC_GROUP *, const EC_GROUP *);
111
b6db386f 112const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *);
458c2917 113int EC_METHOD_get_field_type(const EC_METHOD *);
b6db386f
BM
114
115int EC_GROUP_set_generator(EC_GROUP *, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor);
116EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *);
117int EC_GROUP_get_order(const EC_GROUP *, BIGNUM *order, BN_CTX *);
118int EC_GROUP_get_cofactor(const EC_GROUP *, BIGNUM *cofactor, BN_CTX *);
119
5f3d6f70 120void EC_GROUP_set_nid(EC_GROUP *, int); /* curve name */
945e15a2
BM
121int EC_GROUP_get_nid(const EC_GROUP *);
122
5f3d6f70
BM
123void EC_GROUP_set_asn1_flag(EC_GROUP *, int flag);
124int EC_GROUP_get_asn1_flag(const EC_GROUP *);
125
126void EC_GROUP_set_point_conversion_form(EC_GROUP *, point_conversion_form_t);
127point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
128
129unsigned char *EC_GROUP_get0_seed(const EC_GROUP *);
130size_t EC_GROUP_get_seed_len(const EC_GROUP *);
131size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
48fe4d62 132
3a12ce01 133/* We don't have types for field specifications and field elements in general.
48fe4d62 134 * Otherwise we could declare
7d7db13e 135 * int EC_GROUP_set_curve(EC_GROUP *, .....);
3a12ce01 136 */
bb62a8b0 137int EC_GROUP_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
48fe4d62 138int EC_GROUP_get_curve_GFp(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *);
3a12ce01 139
af28dd6c
BM
140/* EC_GROUP_check() returns 1 if 'group' defines a valid group, 0 otherwise */
141int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
17d6bb81
BM
142/* EC_GROUP_check_discriminant() returns 1 if the discriminant of the
143 * elliptic curve is not zero, 0 otherwise */
144int EC_GROUP_check_discriminant(const EC_GROUP *, BN_CTX *);
945e15a2
BM
145
146/* EC_GROUP_new_GFp() calls EC_GROUP_new() and EC_GROUP_set_GFp()
147 * after choosing an appropriate EC_METHOD */
148EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
149
60d8bae3
BM
150/* EC_GROUP_new_by_nid() and EC_GROUP_new_by_name() also set
151 * generator and order */
9bc44854 152EC_GROUP *EC_GROUP_new_by_nid(int nid);
60d8bae3 153EC_GROUP *EC_GROUP_new_by_name(int name);
36c19463 154/* Currently valid arguments to EC_GROUP_new_by_name() */
945e15a2 155#define EC_GROUP_NO_CURVE 0
0ae1661b 156#define EC_GROUP_NIST_PRIME_192 NID_X9_62_prime192v1
36c19463 157#define EC_GROUP_NIST_PRIME_224 NID_secp224r1
0ae1661b 158#define EC_GROUP_NIST_PRIME_256 NID_X9_62_prime256v1
36c19463
BM
159#define EC_GROUP_NIST_PRIME_384 NID_secp384r1
160#define EC_GROUP_NIST_PRIME_521 NID_secp521r1
945e15a2
BM
161#define EC_GROUP_X9_62_PRIME_192V1 NID_X9_62_prime192v1
162#define EC_GROUP_X9_62_PRIME_192V2 NID_X9_62_prime192v2
163#define EC_GROUP_X9_62_PRIME_192V3 NID_X9_62_prime192v3
164#define EC_GROUP_X9_62_PRIME_239V1 NID_X9_62_prime239v1
165#define EC_GROUP_X9_62_PRIME_239V2 NID_X9_62_prime239v2
166#define EC_GROUP_X9_62_PRIME_239V3 NID_X9_62_prime239v3
167#define EC_GROUP_X9_62_PRIME_256V1 NID_X9_62_prime256v1
36c19463
BM
168#define EC_GROUP_SECG_PRIME_112R1 NID_secp112r1
169#define EC_GROUP_SECG_PRIME_112R2 NID_secp112r2
170#define EC_GROUP_SECG_PRIME_128R1 NID_secp128r1
171#define EC_GROUP_SECG_PRIME_128R2 NID_secp128r2
172#define EC_GROUP_SECG_PRIME_160K1 NID_secp160k1
173#define EC_GROUP_SECG_PRIME_160R1 NID_secp160r1
174#define EC_GROUP_SECG_PRIME_160R2 NID_secp160r2
175#define EC_GROUP_SECG_PRIME_192K1 NID_secp192k1
0ae1661b 176#define EC_GROUP_SECG_PRIME_192R1 NID_X9_62_prime192v1
36c19463
BM
177#define EC_GROUP_SECG_PRIME_224K1 NID_secp224k1
178#define EC_GROUP_SECG_PRIME_224R1 NID_secp224r1
179#define EC_GROUP_SECG_PRIME_256K1 NID_secp256k1
0ae1661b 180#define EC_GROUP_SECG_PRIME_256R1 NID_X9_62_prime256v1
36c19463
BM
181#define EC_GROUP_SECG_PRIME_384R1 NID_secp384r1
182#define EC_GROUP_SECG_PRIME_521R1 NID_secp521r1
af28dd6c
BM
183#define EC_GROUP_WTLS_6 NID_wap_wsg_idm_ecid_wtls6
184#define EC_GROUP_WTLS_7 NID_secp160r1
185#define EC_GROUP_WTLS_8 NID_wap_wsg_idm_ecid_wtls8
186#define EC_GROUP_WTLS_9 NID_wap_wsg_idm_ecid_wtls9
187#define EC_GROUP_WTLS_12 NID_secp224r1
945e15a2 188
3a12ce01
BM
189EC_POINT *EC_POINT_new(const EC_GROUP *);
190void EC_POINT_free(EC_POINT *);
0657bf9c 191void EC_POINT_clear_free(EC_POINT *);
7d7db13e 192int EC_POINT_copy(EC_POINT *, const EC_POINT *);
3a12ce01 193
48fe4d62
BM
194const EC_METHOD *EC_POINT_method_of(const EC_POINT *);
195
226cc7de 196int EC_POINT_set_to_infinity(const EC_GROUP *, EC_POINT *);
1d5bd6cf
BM
197int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *, EC_POINT *,
198 const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *);
199int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *, const EC_POINT *,
200 BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *);
226cc7de
BM
201int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *, EC_POINT *,
202 const BIGNUM *x, const BIGNUM *y, BN_CTX *);
203int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *, const EC_POINT *,
204 BIGNUM *x, BIGNUM *y, BN_CTX *);
1d5bd6cf
BM
205int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *, EC_POINT *,
206 const BIGNUM *x, int y_bit, BN_CTX *);
7d7db13e 207
5b438e9b 208size_t EC_POINT_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form,
7d7db13e
BM
209 unsigned char *buf, size_t len, BN_CTX *);
210int EC_POINT_oct2point(const EC_GROUP *, EC_POINT *,
211 const unsigned char *buf, size_t len, BN_CTX *);
212
6cbe6382
BM
213/* other interfaces to point2oct/oct2point: */
214BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
215 point_conversion_form_t form, BIGNUM *, BN_CTX *);
216EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
217 EC_POINT *, BN_CTX *);
218char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
219 point_conversion_form_t form, BN_CTX *);
220EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
221 EC_POINT *, BN_CTX *);
222
7d7db13e
BM
223int EC_POINT_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *);
224int EC_POINT_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *);
1d5bd6cf 225int EC_POINT_invert(const EC_GROUP *, EC_POINT *, BN_CTX *);
3a12ce01 226
5b438e9b
BM
227int EC_POINT_is_at_infinity(const EC_GROUP *, const EC_POINT *);
228int EC_POINT_is_on_curve(const EC_GROUP *, const EC_POINT *, BN_CTX *);
1d5bd6cf 229int EC_POINT_cmp(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b, BN_CTX *);
fb171e53 230
e869d4bd 231int EC_POINT_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *);
48fe4d62 232int EC_POINTs_make_affine(const EC_GROUP *, size_t num, EC_POINT *[], BN_CTX *);
fb171e53 233
3a12ce01 234
38374911
BM
235int EC_POINTs_mul(const EC_GROUP *, EC_POINT *r, const BIGNUM *, size_t num, const EC_POINT *[], const BIGNUM *[], BN_CTX *);
236int EC_POINT_mul(const EC_GROUP *, EC_POINT *r, const BIGNUM *, const EC_POINT *, const BIGNUM *, BN_CTX *);
194dd046 237int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *);
6cc5e19d 238
6cc5e19d
BM
239
240
458c2917 241/* ASN1 stuff */
254ef80d 242#define OPENSSL_EC_NAMED_CURVE 0x001
458c2917
BM
243
244typedef struct ec_parameters_st ECPARAMETERS;
245typedef struct ecpk_parameters_st ECPKPARAMETERS;
246
247DECLARE_ASN1_ITEM(ECPARAMETERS)
248DECLARE_ASN1_ITEM(ECPKPARAMETERS)
249DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPARAMETERS, ECPARAMETERS)
250DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS)
251
252EC_GROUP *EC_ASN1_pkparameters2group(const ECPKPARAMETERS *);
253ECPKPARAMETERS *EC_ASN1_group2pkparameters(const EC_GROUP *, ECPKPARAMETERS *);
254
254ef80d 255
458c2917
BM
256EC_GROUP *d2i_ECParameters(EC_GROUP **, const unsigned char **in, long len);
257int i2d_ECParameters(const EC_GROUP *, unsigned char **out);
258
259EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
260int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
261
5dbd3efc
BM
262#define d2i_ECPKParameters_bio(bp,x) (EC_GROUP *)ASN1_d2i_bio(NULL, \
263 (char *(*)())d2i_ECPKParameters,(bp),(unsigned char **)(x))
264#define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio(i2d_ECPKParameters,(bp), \
265 (unsigned char *)(x))
266#define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \
267 (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x))
268#define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \
269 (unsigned char *)(x))
458c2917 270
5f3d6f70
BM
271#ifndef OPENSSL_NO_BIO
272int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
273#endif
274#ifndef OPENSSL_NO_FP_API
275int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
276#endif
277
458c2917 278
65e81670
BM
279/* BEGIN ERROR CODES */
280/* The following lines are auto generated by the script mkerr.pl. Any changes
281 * made after this point may be overwritten when the script is next run.
282 */
de10f690 283void ERR_load_EC_strings(void);
6cc5e19d 284
65e81670 285/* Error codes for the EC functions. */
6cc5e19d 286
65e81670 287/* Function codes. */
3ba1f111 288#define EC_F_COMPUTE_WNAF 143
458c2917
BM
289#define EC_F_D2I_ECDSAPARAMETERS 154
290#define EC_F_D2I_ECPARAMETERS 155
291#define EC_F_D2I_ECPKPARAMETERS 161
5f3d6f70
BM
292#define EC_F_ECPKPARAMETERS_PRINT 166
293#define EC_F_ECPKPARAMETERS_PRINT_FP 167
458c2917
BM
294#define EC_F_EC_ASN1_GROUP2CURVE 159
295#define EC_F_EC_ASN1_GROUP2FIELDID 156
296#define EC_F_EC_ASN1_GROUP2PARAMETERS 160
297#define EC_F_EC_ASN1_GROUP2PKPARAMETERS 162
298#define EC_F_EC_ASN1_PARAMETERS2GROUP 157
299#define EC_F_EC_ASN1_PKPARAMETERS2GROUP 163
156e8557
BM
300#define EC_F_EC_GFP_MONT_FIELD_DECODE 133
301#define EC_F_EC_GFP_MONT_FIELD_ENCODE 134
302#define EC_F_EC_GFP_MONT_FIELD_MUL 131
303#define EC_F_EC_GFP_MONT_FIELD_SQR 132
17d6bb81 304#define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 152
de10f690
BM
305#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP 100
306#define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR 101
307#define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 102
308#define EC_F_EC_GFP_SIMPLE_OCT2POINT 103
309#define EC_F_EC_GFP_SIMPLE_POINT2OCT 104
48fe4d62 310#define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 137
de10f690 311#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP 105
bb62a8b0
BM
312#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP 128
313#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP 129
af28dd6c 314#define EC_F_EC_GROUP_CHECK 150
17d6bb81 315#define EC_F_EC_GROUP_CHECK_DISCRIMINANT 153
de10f690 316#define EC_F_EC_GROUP_COPY 106
48fe4d62
BM
317#define EC_F_EC_GROUP_GET0_GENERATOR 139
318#define EC_F_EC_GROUP_GET_COFACTOR 140
bb62a8b0 319#define EC_F_EC_GROUP_GET_CURVE_GFP 130
de10f690 320#define EC_F_EC_GROUP_GET_EXTRA_DATA 107
48fe4d62 321#define EC_F_EC_GROUP_GET_ORDER 141
60d8bae3 322#define EC_F_EC_GROUP_GROUP2NID 147
de10f690 323#define EC_F_EC_GROUP_NEW 108
60d8bae3
BM
324#define EC_F_EC_GROUP_NEW_BY_NAME 144
325#define EC_F_EC_GROUP_NEW_BY_NID 146
326#define EC_F_EC_GROUP_NEW_GFP_FROM_HEX 148
194dd046 327#define EC_F_EC_GROUP_PRECOMPUTE_MULT 142
de10f690
BM
328#define EC_F_EC_GROUP_SET_CURVE_GFP 109
329#define EC_F_EC_GROUP_SET_EXTRA_DATA 110
330#define EC_F_EC_GROUP_SET_GENERATOR 111
48fe4d62
BM
331#define EC_F_EC_POINTS_MAKE_AFFINE 136
332#define EC_F_EC_POINTS_MUL 138
de10f690
BM
333#define EC_F_EC_POINT_ADD 112
334#define EC_F_EC_POINT_CMP 113
335#define EC_F_EC_POINT_COPY 114
336#define EC_F_EC_POINT_DBL 115
337#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 116
338#define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 117
339#define EC_F_EC_POINT_IS_AT_INFINITY 118
340#define EC_F_EC_POINT_IS_ON_CURVE 119
341#define EC_F_EC_POINT_MAKE_AFFINE 120
342#define EC_F_EC_POINT_NEW 121
343#define EC_F_EC_POINT_OCT2POINT 122
344#define EC_F_EC_POINT_POINT2OCT 123
345#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124
1d5bd6cf
BM
346#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 125
347#define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126
de10f690 348#define EC_F_EC_POINT_SET_TO_INFINITY 127
156e8557 349#define EC_F_GFP_MONT_GROUP_SET_CURVE_GFP 135
458c2917
BM
350#define EC_F_I2D_ECDSAPARAMETERS 158
351#define EC_F_I2D_ECPARAMETERS 164
352#define EC_F_I2D_ECPKPARAMETERS 165
6cc5e19d 353
65e81670 354/* Reason codes. */
458c2917
BM
355#define EC_R_ASN1_ERROR 130
356#define EC_R_ASN1_UNKNOWN_FIELD 131
226cc7de 357#define EC_R_BUFFER_TOO_SMALL 100
458c2917
BM
358#define EC_R_D2I_ECPARAMETERS_FAILURE 132
359#define EC_R_D2I_ECPKPARAMETERS_FAILURE 133
360#define EC_R_D2I_EC_PARAMETERS_FAILURE 123
af28dd6c 361#define EC_R_DISCRIMINANT_IS_ZERO 118
458c2917
BM
362#define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 124
363#define EC_R_GROUP2PARAMETERS_FAILURE 125
364#define EC_R_GROUP2PKPARAMETERS_FAILURE 134
365#define EC_R_I2D_ECPKPARAMETERS_FAILURE 135
366#define EC_R_I2D_EC_PARAMETERS_FAILURE 126
226cc7de 367#define EC_R_INCOMPATIBLE_OBJECTS 101
48fe4d62 368#define EC_R_INVALID_ARGUMENT 112
bb62a8b0
BM
369#define EC_R_INVALID_COMPRESSED_POINT 110
370#define EC_R_INVALID_COMPRESSION_BIT 109
226cc7de 371#define EC_R_INVALID_ENCODING 102
de10f690
BM
372#define EC_R_INVALID_FIELD 103
373#define EC_R_INVALID_FORM 104
af28dd6c 374#define EC_R_INVALID_GROUP_ORDER 119
458c2917
BM
375#define EC_R_MISSING_PARAMETERS 127
376#define EC_R_NOT_IMPLEMENTED 136
156e8557 377#define EC_R_NOT_INITIALIZED 111
de10f690 378#define EC_R_NO_SUCH_EXTRA_DATA 105
458c2917
BM
379#define EC_R_PARAMETERS2GROUP_FAILURE 128
380#define EC_R_PKPARAMETERS2GROUP_FAILURE 137
de10f690
BM
381#define EC_R_POINT_AT_INFINITY 106
382#define EC_R_POINT_IS_NOT_ON_CURVE 107
383#define EC_R_SLOT_FULL 108
6f8f4431 384#define EC_R_UNDEFINED_GENERATOR 113
af28dd6c 385#define EC_R_UNDEFINED_ORDER 122
945e15a2
BM
386#define EC_R_UNKNOWN_GROUP 116
387#define EC_R_UNKNOWN_NID 117
38374911 388#define EC_R_UNKNOWN_ORDER 114
458c2917 389#define EC_R_UNKNOWN_PARAMETERS_TYPE 129
6cc5e19d 390
65e81670
BM
391#ifdef __cplusplus
392}
393#endif
5acaa495 394#endif