Don't use assertions to check application-provided arguments;
[oweals/openssl.git] / crypto / bn / bn.h
index 0db2ac084509604773596a71210b7e324862d821..6d754d5547767dbcdbda979312d876e0436eec1e 100644 (file)
@@ -303,7 +303,12 @@ struct bn_mont_ctx_st
        BIGNUM N;      /* The modulus */
        BIGNUM Ni;     /* R*(1/R mod N) - N*Ni = 1
                        * (Ni is only stored for bignum algorithm) */
+#if 0
+       /* OpenSSL 0.9.9 preview: */
+       BN_ULONG n0[2];/* least significant word(s) of Ni */
+#else
        BN_ULONG n0;   /* least significant word of Ni */
+#endif
        int flags;
        };
 
@@ -435,8 +440,6 @@ void        BN_set_negative(BIGNUM *b, int n);
 
 int    BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
        BN_CTX *ctx);
-int    BN_div_no_branch(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
-       const BIGNUM *d, BN_CTX *ctx);
 #define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx))
 int    BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
 int    BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
@@ -505,8 +508,6 @@ int BN_gcd(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx);
 int    BN_kronecker(const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); /* returns -2 for error */
 BIGNUM *BN_mod_inverse(BIGNUM *ret,
        const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
-BIGNUM *BN_mod_inverse_no_branch(BIGNUM *ret,
-       const BIGNUM *A, const BIGNUM *n,BN_CTX *ctx);
 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
        const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
 
@@ -789,6 +790,7 @@ void ERR_load_BN_strings(void);
 #define BN_F_BN_CTX_NEW                                         106
 #define BN_F_BN_CTX_START                               129
 #define BN_F_BN_DIV                                     107
+#define BN_F_BN_DIV_NO_BRANCH                           138
 #define BN_F_BN_DIV_RECP                                130
 #define BN_F_BN_EXP                                     123
 #define BN_F_BN_EXPAND2                                         108
@@ -807,6 +809,7 @@ void ERR_load_BN_strings(void);
 #define BN_F_BN_MOD_EXP_RECP                            125
 #define BN_F_BN_MOD_EXP_SIMPLE                          126
 #define BN_F_BN_MOD_INVERSE                             110
+#define BN_F_BN_MOD_INVERSE_NO_BRANCH                   139
 #define BN_F_BN_MOD_LSHIFT_QUICK                        119
 #define BN_F_BN_MOD_MUL_RECIPROCAL                      111
 #define BN_F_BN_MOD_SQRT                                121