remove OPENSSL_NO_ASM dependency
[oweals/openssl.git] / crypto / dh / dh.h
index 991a018ef2d5dc356178c361e594d61acfefd75e..d1559fd4f878cf9e7b8a1eae15f1bdf3ab486c96 100644 (file)
 #include <openssl/bn.h>
 #endif
        
-#define DH_FLAG_CACHE_MONT_P   0x01
+#define DH_FLAG_CACHE_MONT_P     0x01
+#define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH
+                                       * implementation now uses constant time
+                                       * modular exponentiation for secret exponents
+                                       * by default. This flag causes the
+                                       * faster variable sliding window method to
+                                       * be used for all exponents.
+                                       */
 
 #ifdef  __cplusplus
 extern "C" {
@@ -114,7 +121,7 @@ struct dh_st
        BIGNUM *priv_key;       /* x */
 
        int flags;
-       char *method_mont_p;
+       BN_MONT_CTX *method_mont_p;
        /* Place holders if we want to do X9.42 DH */
        BIGNUM *q;
        BIGNUM *j;
@@ -198,12 +205,13 @@ void ERR_load_DH_strings(void);
 /* Error codes for the DH functions. */
 
 /* Function codes. */
+#define DH_F_COMPUTE_KEY                                102
 #define DH_F_DHPARAMS_PRINT                             100
 #define DH_F_DHPARAMS_PRINT_FP                          101
-#define DH_F_DH_COMPUTE_KEY                             102
-#define DH_F_DH_GENERATE_KEY                            103
-#define DH_F_DH_GENERATE_PARAMETERS                     104
+#define DH_F_DH_BUILTIN_GENPARAMS                       106
 #define DH_F_DH_NEW_METHOD                              105
+#define DH_F_GENERATE_KEY                               103
+#define DH_F_GENERATE_PARAMETERS                        104
 
 /* Reason codes. */
 #define DH_R_BAD_GENERATOR                              101