mark all block comments that need format preserving so that
[openssl.git] / crypto / ec / ec.h
index c357b2736d832bdf48c6aeb4b7641d9c5cd2fcc3..477e476d08a7e915d249ae385f683f38b3a316cf 100644 (file)
@@ -84,7 +84,7 @@
 
 #include <openssl/asn1.h>
 #include <openssl/symhacks.h>
-#ifndef OPENSSL_NO_DEPRECATED
+#ifdef OPENSSL_USE_DEPRECATED
 #include <openssl/bn.h>
 #endif
 
@@ -118,7 +118,7 @@ typedef enum {
 typedef struct ec_method_st EC_METHOD;
 
 typedef struct ec_group_st
-       /*
+       /*-
         EC_METHOD *meth;
         -- field definition
         -- curve coefficients
@@ -245,6 +245,12 @@ int EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIG
  */
 const EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);
 
+/** Returns the montgomery data for order(Generator)
+ *  \param  group  EC_GROUP object
+ *  \return the currently used generator (possibly NULL).
+*/
+BN_MONT_CTX *EC_GROUP_get_mont_data(const EC_GROUP *group);
+
 /** Gets the order of a EC_GROUP
  *  \param  group  EC_GROUP object
  *  \param  order  BIGNUM to which the order is copied
@@ -633,7 +639,7 @@ int EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN
 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx);
 
-/** Computes r = generator * n sum_{i=0}^num p[i] * m[i]
+/** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]
  *  \param  group  underlying EC_GROUP object
  *  \param  r      EC_POINT object for the result
  *  \param  n      BIGNUM with the multiplier for the group generator (optional)
@@ -888,7 +894,7 @@ int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
 
 /** Encodes ec parameter and stores the result in a buffer.
- *  \param  key  the EC_KEY object with ec paramters to encode
+ *  \param  key  the EC_KEY object with ec parameters to encode
  *  \param  out  the buffer for the result (if NULL the function returns number
  *               of bytes needed).
  *  \return 1 on success and 0 if an error occurred.
@@ -1176,6 +1182,11 @@ void ERR_load_EC_strings(void);
 #define EC_F_NISTP224_PRE_COMP_NEW                      227
 #define EC_F_NISTP256_PRE_COMP_NEW                      236
 #define EC_F_NISTP521_PRE_COMP_NEW                      237
+#define EC_F_ECP_NISTZ256_GET_AFFINE                    240
+#define EC_F_ECP_NISTZ256_POINTS_MUL                    241
+#define EC_F_ECP_NISTZ256_WINDOWED_MUL                  242
+#define EC_F_ECP_NISTZ256_MULT_PRECOMPUTE               243
+#define EC_F_ECP_NISTZ256_PRE_COMP_NEW                  244
 #define EC_F_O2I_ECPUBLICKEY                            152
 #define EC_F_OLD_EC_PRIV_DECODE                                 222
 #define EC_F_PKEY_EC_CTRL                               197