Eneboo - Documentación para desarrolladores
src/libdigidoc/openssl/include/openssl/ec.h
Ir a la documentación de este archivo.
00001 /* crypto/ec/ec.h */
00002 /*
00003  * Originally written by Bodo Moeller for the OpenSSL project.
00004  */
00005 /* ====================================================================
00006  * Copyright (c) 1998-2003 The OpenSSL Project.  All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions
00010  * are met:
00011  *
00012  * 1. Redistributions of source code must retain the above copyright
00013  *    notice, this list of conditions and the following disclaimer. 
00014  *
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in
00017  *    the documentation and/or other materials provided with the
00018  *    distribution.
00019  *
00020  * 3. All advertising materials mentioning features or use of this
00021  *    software must display the following acknowledgment:
00022  *    "This product includes software developed by the OpenSSL Project
00023  *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
00024  *
00025  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
00026  *    endorse or promote products derived from this software without
00027  *    prior written permission. For written permission, please contact
00028  *    openssl-core@openssl.org.
00029  *
00030  * 5. Products derived from this software may not be called "OpenSSL"
00031  *    nor may "OpenSSL" appear in their names without prior written
00032  *    permission of the OpenSSL Project.
00033  *
00034  * 6. Redistributions of any form whatsoever must retain the following
00035  *    acknowledgment:
00036  *    "This product includes software developed by the OpenSSL Project
00037  *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
00038  *
00039  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
00040  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00041  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00042  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
00043  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00044  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
00045  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00046  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00047  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
00048  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00049  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
00050  * OF THE POSSIBILITY OF SUCH DAMAGE.
00051  * ====================================================================
00052  *
00053  * This product includes cryptographic software written by Eric Young
00054  * (eay@cryptsoft.com).  This product includes software written by Tim
00055  * Hudson (tjh@cryptsoft.com).
00056  *
00057  */
00058 /* ====================================================================
00059  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
00060  *
00061  * Portions of the attached software ("Contribution") are developed by 
00062  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
00063  *
00064  * The Contribution is licensed pursuant to the OpenSSL open source
00065  * license provided above.
00066  *
00067  * The elliptic curve binary polynomial software is originally written by 
00068  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.
00069  *
00070  */
00071 
00072 #ifndef HEADER_EC_H
00073 #define HEADER_EC_H
00074 
00075 #include <openssl/opensslconf.h>
00076 
00077 #ifdef OPENSSL_NO_EC
00078 #error EC is disabled.
00079 #endif
00080 
00081 #include <openssl/asn1.h>
00082 #include <openssl/symhacks.h>
00083 #ifndef OPENSSL_NO_DEPRECATED
00084 #include <openssl/bn.h>
00085 #endif
00086 
00087 #ifdef  __cplusplus
00088 extern "C" {
00089 #elif defined(__SUNPRO_C)
00090 # if __SUNPRO_C >= 0x520
00091 # pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
00092 # endif
00093 #endif
00094 
00095 
00096 #ifndef OPENSSL_ECC_MAX_FIELD_BITS
00097 # define OPENSSL_ECC_MAX_FIELD_BITS 661
00098 #endif
00099 
00100 typedef enum {
00101         /* values as defined in X9.62 (ECDSA) and elsewhere */
00102         POINT_CONVERSION_COMPRESSED = 2,
00103         POINT_CONVERSION_UNCOMPRESSED = 4,
00104         POINT_CONVERSION_HYBRID = 6
00105 } point_conversion_form_t;
00106 
00107 
00108 typedef struct ec_method_st EC_METHOD;
00109 
00110 typedef struct ec_group_st
00111         /*
00112          EC_METHOD *meth;
00113          -- field definition
00114          -- curve coefficients
00115          -- optional generator with associated information (order, cofactor)
00116          -- optional extra data (precomputed table for fast computation of multiples of generator)
00117          -- ASN1 stuff
00118         */
00119         EC_GROUP;
00120 
00121 typedef struct ec_point_st EC_POINT;
00122 
00123 
00124 /* EC_METHODs for curves over GF(p).
00125  * EC_GFp_simple_method provides the basis for the optimized methods.
00126  */
00127 const EC_METHOD *EC_GFp_simple_method(void);
00128 const EC_METHOD *EC_GFp_mont_method(void);
00129 const EC_METHOD *EC_GFp_nist_method(void);
00130 
00131 /* EC_METHOD for curves over GF(2^m).
00132  */
00133 const EC_METHOD *EC_GF2m_simple_method(void);
00134 
00135 
00136 EC_GROUP *EC_GROUP_new(const EC_METHOD *);
00137 void EC_GROUP_free(EC_GROUP *);
00138 void EC_GROUP_clear_free(EC_GROUP *);
00139 int EC_GROUP_copy(EC_GROUP *, const EC_GROUP *);
00140 EC_GROUP *EC_GROUP_dup(const EC_GROUP *);
00141 
00142 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *);
00143 int EC_METHOD_get_field_type(const EC_METHOD *);
00144 
00145 int EC_GROUP_set_generator(EC_GROUP *, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor);
00146 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *);
00147 int EC_GROUP_get_order(const EC_GROUP *, BIGNUM *order, BN_CTX *);
00148 int EC_GROUP_get_cofactor(const EC_GROUP *, BIGNUM *cofactor, BN_CTX *);
00149 
00150 void EC_GROUP_set_curve_name(EC_GROUP *, int nid);
00151 int EC_GROUP_get_curve_name(const EC_GROUP *);
00152 
00153 void EC_GROUP_set_asn1_flag(EC_GROUP *, int flag);
00154 int EC_GROUP_get_asn1_flag(const EC_GROUP *);
00155 
00156 void EC_GROUP_set_point_conversion_form(EC_GROUP *, point_conversion_form_t);
00157 point_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);
00158 
00159 unsigned char *EC_GROUP_get0_seed(const EC_GROUP *);
00160 size_t EC_GROUP_get_seed_len(const EC_GROUP *);
00161 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
00162 
00163 int EC_GROUP_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
00164 int EC_GROUP_get_curve_GFp(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *);
00165 int EC_GROUP_set_curve_GF2m(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
00166 int EC_GROUP_get_curve_GF2m(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *);
00167 
00168 /* returns the number of bits needed to represent a field element */
00169 int EC_GROUP_get_degree(const EC_GROUP *);
00170 
00171 /* EC_GROUP_check() returns 1 if 'group' defines a valid group, 0 otherwise */
00172 int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
00173 /* EC_GROUP_check_discriminant() returns 1 if the discriminant of the
00174  * elliptic curve is not zero, 0 otherwise */
00175 int EC_GROUP_check_discriminant(const EC_GROUP *, BN_CTX *);
00176 
00177 /* EC_GROUP_cmp() returns 0 if both groups are equal and 1 otherwise */
00178 int EC_GROUP_cmp(const EC_GROUP *, const EC_GROUP *, BN_CTX *);
00179 
00180 /* EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*()
00181  * after choosing an appropriate EC_METHOD */
00182 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
00183 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
00184 
00185 /* EC_GROUP_new_by_curve_name() creates a EC_GROUP structure
00186  * specified by a curve name (in form of a NID) */
00187 EC_GROUP *EC_GROUP_new_by_curve_name(int nid);
00188 /* handling of internal curves */
00189 typedef struct { 
00190         int nid;
00191         const char *comment;
00192         } EC_builtin_curve;
00193 /* EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number 
00194  * of all available curves or zero if a error occurred. 
00195  * In case r ist not zero nitems EC_builtin_curve structures 
00196  * are filled with the data of the first nitems internal groups */
00197 size_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
00198 
00199 
00200 /* EC_POINT functions */
00201 
00202 EC_POINT *EC_POINT_new(const EC_GROUP *);
00203 void EC_POINT_free(EC_POINT *);
00204 void EC_POINT_clear_free(EC_POINT *);
00205 int EC_POINT_copy(EC_POINT *, const EC_POINT *);
00206 EC_POINT *EC_POINT_dup(const EC_POINT *, const EC_GROUP *);
00207  
00208 const EC_METHOD *EC_POINT_method_of(const EC_POINT *);
00209 
00210 int EC_POINT_set_to_infinity(const EC_GROUP *, EC_POINT *);
00211 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *, EC_POINT *,
00212         const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *);
00213 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *, const EC_POINT *,
00214         BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *);
00215 int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *, EC_POINT *,
00216         const BIGNUM *x, const BIGNUM *y, BN_CTX *);
00217 int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *, const EC_POINT *,
00218         BIGNUM *x, BIGNUM *y, BN_CTX *);
00219 int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *, EC_POINT *,
00220         const BIGNUM *x, int y_bit, BN_CTX *);
00221 
00222 int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *, EC_POINT *,
00223         const BIGNUM *x, const BIGNUM *y, BN_CTX *);
00224 int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *, const EC_POINT *,
00225         BIGNUM *x, BIGNUM *y, BN_CTX *);
00226 int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *, EC_POINT *,
00227         const BIGNUM *x, int y_bit, BN_CTX *);
00228 
00229 size_t EC_POINT_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form,
00230         unsigned char *buf, size_t len, BN_CTX *);
00231 int EC_POINT_oct2point(const EC_GROUP *, EC_POINT *,
00232         const unsigned char *buf, size_t len, BN_CTX *);
00233 
00234 /* other interfaces to point2oct/oct2point: */
00235 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
00236         point_conversion_form_t form, BIGNUM *, BN_CTX *);
00237 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
00238         EC_POINT *, BN_CTX *);
00239 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
00240         point_conversion_form_t form, BN_CTX *);
00241 EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
00242         EC_POINT *, BN_CTX *);
00243 
00244 int EC_POINT_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *);
00245 int EC_POINT_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *);
00246 int EC_POINT_invert(const EC_GROUP *, EC_POINT *, BN_CTX *);
00247 
00248 int EC_POINT_is_at_infinity(const EC_GROUP *, const EC_POINT *);
00249 int EC_POINT_is_on_curve(const EC_GROUP *, const EC_POINT *, BN_CTX *);
00250 int EC_POINT_cmp(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b, BN_CTX *);
00251 
00252 int EC_POINT_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *);
00253 int EC_POINTs_make_affine(const EC_GROUP *, size_t num, EC_POINT *[], BN_CTX *);
00254 
00255 
00256 int EC_POINTs_mul(const EC_GROUP *, EC_POINT *r, const BIGNUM *, size_t num, const EC_POINT *[], const BIGNUM *[], BN_CTX *);
00257 int EC_POINT_mul(const EC_GROUP *, EC_POINT *r, const BIGNUM *, const EC_POINT *, const BIGNUM *, BN_CTX *);
00258 
00259 /* EC_GROUP_precompute_mult() stores multiples of generator for faster point multiplication */
00260 int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *);
00261 /* EC_GROUP_have_precompute_mult() reports whether such precomputation has been done */
00262 int EC_GROUP_have_precompute_mult(const EC_GROUP *);
00263 
00264 
00265 
00266 /* ASN1 stuff */
00267 
00268 /* EC_GROUP_get_basis_type() returns the NID of the basis type
00269  * used to represent the field elements */
00270 int EC_GROUP_get_basis_type(const EC_GROUP *);
00271 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
00272 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1, 
00273         unsigned int *k2, unsigned int *k3);
00274 
00275 #define OPENSSL_EC_NAMED_CURVE  0x001
00276 
00277 typedef struct ecpk_parameters_st ECPKPARAMETERS;
00278 
00279 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
00280 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
00281 
00282 #define d2i_ECPKParameters_bio(bp,x) ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x)
00283 #define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x)
00284 #define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \
00285                 (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x))
00286 #define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \
00287                 (unsigned char *)(x))
00288 
00289 #ifndef OPENSSL_NO_BIO
00290 int     ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);
00291 #endif
00292 #ifndef OPENSSL_NO_FP_API
00293 int     ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);
00294 #endif
00295 
00296 /* the EC_KEY stuff */
00297 typedef struct ec_key_st EC_KEY;
00298 
00299 /* some values for the encoding_flag */
00300 #define EC_PKEY_NO_PARAMETERS   0x001
00301 #define EC_PKEY_NO_PUBKEY       0x002
00302 
00303 EC_KEY *EC_KEY_new(void);
00304 EC_KEY *EC_KEY_new_by_curve_name(int nid);
00305 void EC_KEY_free(EC_KEY *);
00306 EC_KEY *EC_KEY_copy(EC_KEY *, const EC_KEY *);
00307 EC_KEY *EC_KEY_dup(const EC_KEY *);
00308 
00309 int EC_KEY_up_ref(EC_KEY *);
00310 
00311 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *);
00312 int EC_KEY_set_group(EC_KEY *, const EC_GROUP *);
00313 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *);
00314 int EC_KEY_set_private_key(EC_KEY *, const BIGNUM *);
00315 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *);
00316 int EC_KEY_set_public_key(EC_KEY *, const EC_POINT *);
00317 unsigned EC_KEY_get_enc_flags(const EC_KEY *);
00318 void EC_KEY_set_enc_flags(EC_KEY *, unsigned int);
00319 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *);
00320 void EC_KEY_set_conv_form(EC_KEY *, point_conversion_form_t);
00321 /* functions to set/get method specific data  */
00322 void *EC_KEY_get_key_method_data(EC_KEY *, 
00323         void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *));
00324 void EC_KEY_insert_key_method_data(EC_KEY *, void *data,
00325         void *(*dup_func)(void *), void (*free_func)(void *), void (*clear_free_func)(void *));
00326 /* wrapper functions for the underlying EC_GROUP object */
00327 void EC_KEY_set_asn1_flag(EC_KEY *, int);
00328 int EC_KEY_precompute_mult(EC_KEY *, BN_CTX *ctx);
00329 
00330 /* EC_KEY_generate_key() creates a ec private (public) key */
00331 int EC_KEY_generate_key(EC_KEY *);
00332 /* EC_KEY_check_key() */
00333 int EC_KEY_check_key(const EC_KEY *);
00334 
00335 /* de- and encoding functions for SEC1 ECPrivateKey */
00336 EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len);
00337 int i2d_ECPrivateKey(EC_KEY *a, unsigned char **out);
00338 /* de- and encoding functions for EC parameters */
00339 EC_KEY *d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len);
00340 int i2d_ECParameters(EC_KEY *a, unsigned char **out);
00341 /* de- and encoding functions for EC public key
00342  * (octet string, not DER -- hence 'o2i' and 'i2o') */
00343 EC_KEY *o2i_ECPublicKey(EC_KEY **a, const unsigned char **in, long len);
00344 int i2o_ECPublicKey(EC_KEY *a, unsigned char **out);
00345 
00346 #ifndef OPENSSL_NO_BIO
00347 int     ECParameters_print(BIO *bp, const EC_KEY *x);
00348 int     EC_KEY_print(BIO *bp, const EC_KEY *x, int off);
00349 #endif
00350 #ifndef OPENSSL_NO_FP_API
00351 int     ECParameters_print_fp(FILE *fp, const EC_KEY *x);
00352 int     EC_KEY_print_fp(FILE *fp, const EC_KEY *x, int off);
00353 #endif
00354 
00355 #define ECParameters_dup(x) ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x)
00356 
00357 #ifndef __cplusplus
00358 #if defined(__SUNPRO_C)
00359 #  if __SUNPRO_C >= 0x520
00360 # pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)
00361 #  endif
00362 # endif
00363 #endif
00364 
00365 /* BEGIN ERROR CODES */
00366 /* The following lines are auto generated by the script mkerr.pl. Any changes
00367  * made after this point may be overwritten when the script is next run.
00368  */
00369 void ERR_load_EC_strings(void);
00370 
00371 /* Error codes for the EC functions. */
00372 
00373 /* Function codes. */
00374 #define EC_F_COMPUTE_WNAF                                143
00375 #define EC_F_D2I_ECPARAMETERS                            144
00376 #define EC_F_D2I_ECPKPARAMETERS                          145
00377 #define EC_F_D2I_ECPRIVATEKEY                            146
00378 #define EC_F_ECPARAMETERS_PRINT                          147
00379 #define EC_F_ECPARAMETERS_PRINT_FP                       148
00380 #define EC_F_ECPKPARAMETERS_PRINT                        149
00381 #define EC_F_ECPKPARAMETERS_PRINT_FP                     150
00382 #define EC_F_ECP_NIST_MOD_192                            203
00383 #define EC_F_ECP_NIST_MOD_224                            204
00384 #define EC_F_ECP_NIST_MOD_256                            205
00385 #define EC_F_ECP_NIST_MOD_521                            206
00386 #define EC_F_EC_ASN1_GROUP2CURVE                         153
00387 #define EC_F_EC_ASN1_GROUP2FIELDID                       154
00388 #define EC_F_EC_ASN1_GROUP2PARAMETERS                    155
00389 #define EC_F_EC_ASN1_GROUP2PKPARAMETERS                  156
00390 #define EC_F_EC_ASN1_PARAMETERS2GROUP                    157
00391 #define EC_F_EC_ASN1_PKPARAMETERS2GROUP                  158
00392 #define EC_F_EC_EX_DATA_SET_DATA                         211
00393 #define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY           208
00394 #define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT     159
00395 #define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE              195
00396 #define EC_F_EC_GF2M_SIMPLE_OCT2POINT                    160
00397 #define EC_F_EC_GF2M_SIMPLE_POINT2OCT                    161
00398 #define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 162
00399 #define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 163
00400 #define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES   164
00401 #define EC_F_EC_GFP_MONT_FIELD_DECODE                    133
00402 #define EC_F_EC_GFP_MONT_FIELD_ENCODE                    134
00403 #define EC_F_EC_GFP_MONT_FIELD_MUL                       131
00404 #define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE                209
00405 #define EC_F_EC_GFP_MONT_FIELD_SQR                       132
00406 #define EC_F_EC_GFP_MONT_GROUP_SET_CURVE                 189
00407 #define EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP             135
00408 #define EC_F_EC_GFP_NIST_FIELD_MUL                       200
00409 #define EC_F_EC_GFP_NIST_FIELD_SQR                       201
00410 #define EC_F_EC_GFP_NIST_GROUP_SET_CURVE                 202
00411 #define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT      165
00412 #define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE               166
00413 #define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP           100
00414 #define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR           101
00415 #define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE                   102
00416 #define EC_F_EC_GFP_SIMPLE_OCT2POINT                     103
00417 #define EC_F_EC_GFP_SIMPLE_POINT2OCT                     104
00418 #define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE            137
00419 #define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES  167
00420 #define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP 105
00421 #define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES  168
00422 #define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP 128
00423 #define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES    169
00424 #define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP 129
00425 #define EC_F_EC_GROUP_CHECK                              170
00426 #define EC_F_EC_GROUP_CHECK_DISCRIMINANT                 171
00427 #define EC_F_EC_GROUP_COPY                               106
00428 #define EC_F_EC_GROUP_GET0_GENERATOR                     139
00429 #define EC_F_EC_GROUP_GET_COFACTOR                       140
00430 #define EC_F_EC_GROUP_GET_CURVE_GF2M                     172
00431 #define EC_F_EC_GROUP_GET_CURVE_GFP                      130
00432 #define EC_F_EC_GROUP_GET_DEGREE                         173
00433 #define EC_F_EC_GROUP_GET_ORDER                          141
00434 #define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS              193
00435 #define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS                194
00436 #define EC_F_EC_GROUP_NEW                                108
00437 #define EC_F_EC_GROUP_NEW_BY_CURVE_NAME                  174
00438 #define EC_F_EC_GROUP_NEW_FROM_DATA                      175
00439 #define EC_F_EC_GROUP_PRECOMPUTE_MULT                    142
00440 #define EC_F_EC_GROUP_SET_CURVE_GF2M                     176
00441 #define EC_F_EC_GROUP_SET_CURVE_GFP                      109
00442 #define EC_F_EC_GROUP_SET_EXTRA_DATA                     110
00443 #define EC_F_EC_GROUP_SET_GENERATOR                      111
00444 #define EC_F_EC_KEY_CHECK_KEY                            177
00445 #define EC_F_EC_KEY_COPY                                 178
00446 #define EC_F_EC_KEY_GENERATE_KEY                         179
00447 #define EC_F_EC_KEY_NEW                                  182
00448 #define EC_F_EC_KEY_PRINT                                180
00449 #define EC_F_EC_KEY_PRINT_FP                             181
00450 #define EC_F_EC_POINTS_MAKE_AFFINE                       136
00451 #define EC_F_EC_POINTS_MUL                               138
00452 #define EC_F_EC_POINT_ADD                                112
00453 #define EC_F_EC_POINT_CMP                                113
00454 #define EC_F_EC_POINT_COPY                               114
00455 #define EC_F_EC_POINT_DBL                                115
00456 #define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M        183
00457 #define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP         116
00458 #define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP    117
00459 #define EC_F_EC_POINT_INVERT                             210
00460 #define EC_F_EC_POINT_IS_AT_INFINITY                     118
00461 #define EC_F_EC_POINT_IS_ON_CURVE                        119
00462 #define EC_F_EC_POINT_MAKE_AFFINE                        120
00463 #define EC_F_EC_POINT_MUL                                184
00464 #define EC_F_EC_POINT_NEW                                121
00465 #define EC_F_EC_POINT_OCT2POINT                          122
00466 #define EC_F_EC_POINT_POINT2OCT                          123
00467 #define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M        185
00468 #define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP         124
00469 #define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M    186
00470 #define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP     125
00471 #define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP    126
00472 #define EC_F_EC_POINT_SET_TO_INFINITY                    127
00473 #define EC_F_EC_PRE_COMP_DUP                             207
00474 #define EC_F_EC_PRE_COMP_NEW                             196
00475 #define EC_F_EC_WNAF_MUL                                 187
00476 #define EC_F_EC_WNAF_PRECOMPUTE_MULT                     188
00477 #define EC_F_I2D_ECPARAMETERS                            190
00478 #define EC_F_I2D_ECPKPARAMETERS                          191
00479 #define EC_F_I2D_ECPRIVATEKEY                            192
00480 #define EC_F_I2O_ECPUBLICKEY                             151
00481 #define EC_F_O2I_ECPUBLICKEY                             152
00482 
00483 /* Reason codes. */
00484 #define EC_R_ASN1_ERROR                                  115
00485 #define EC_R_ASN1_UNKNOWN_FIELD                          116
00486 #define EC_R_BUFFER_TOO_SMALL                            100
00487 #define EC_R_D2I_ECPKPARAMETERS_FAILURE                  117
00488 #define EC_R_DISCRIMINANT_IS_ZERO                        118
00489 #define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE                119
00490 #define EC_R_FIELD_TOO_LARGE                             138
00491 #define EC_R_GROUP2PKPARAMETERS_FAILURE                  120
00492 #define EC_R_I2D_ECPKPARAMETERS_FAILURE                  121
00493 #define EC_R_INCOMPATIBLE_OBJECTS                        101
00494 #define EC_R_INVALID_ARGUMENT                            112
00495 #define EC_R_INVALID_COMPRESSED_POINT                    110
00496 #define EC_R_INVALID_COMPRESSION_BIT                     109
00497 #define EC_R_INVALID_ENCODING                            102
00498 #define EC_R_INVALID_FIELD                               103
00499 #define EC_R_INVALID_FORM                                104
00500 #define EC_R_INVALID_GROUP_ORDER                         122
00501 #define EC_R_INVALID_PENTANOMIAL_BASIS                   132
00502 #define EC_R_INVALID_PRIVATE_KEY                         123
00503 #define EC_R_INVALID_TRINOMIAL_BASIS                     137
00504 #define EC_R_MISSING_PARAMETERS                          124
00505 #define EC_R_MISSING_PRIVATE_KEY                         125
00506 #define EC_R_NOT_A_NIST_PRIME                            135
00507 #define EC_R_NOT_A_SUPPORTED_NIST_PRIME                  136
00508 #define EC_R_NOT_IMPLEMENTED                             126
00509 #define EC_R_NOT_INITIALIZED                             111
00510 #define EC_R_NO_FIELD_MOD                                133
00511 #define EC_R_PASSED_NULL_PARAMETER                       134
00512 #define EC_R_PKPARAMETERS2GROUP_FAILURE                  127
00513 #define EC_R_POINT_AT_INFINITY                           106
00514 #define EC_R_POINT_IS_NOT_ON_CURVE                       107
00515 #define EC_R_SLOT_FULL                                   108
00516 #define EC_R_UNDEFINED_GENERATOR                         113
00517 #define EC_R_UNDEFINED_ORDER                             128
00518 #define EC_R_UNKNOWN_GROUP                               129
00519 #define EC_R_UNKNOWN_ORDER                               114
00520 #define EC_R_UNSUPPORTED_FIELD                           131
00521 #define EC_R_WRONG_ORDER                                 130
00522 
00523 #ifdef  __cplusplus
00524 }
00525 #endif
00526 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'