X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbn%2Fbn.h;h=7fe78bb774fb963a732628b0f3fa544bb35e0e55;hb=7b1a04519fa038b51773c1214e267c8ad7fd5981;hp=eedde6a016db715bb2351ccd26a35f7c7cc9eac8;hpb=3fdc6c11aab4a6886dd9126825fc584cb0f7e608;p=oweals%2Fopenssl.git diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index eedde6a016..7fe78bb774 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -540,6 +540,17 @@ int BN_is_prime_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, BN_GENCB *cb); int BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, int do_trial_division, BN_GENCB *cb); +int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx); + +int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, + const BIGNUM *Xp, const BIGNUM *Xp1, const BIGNUM *Xp2, + const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb); +int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, + BIGNUM *Xp1, BIGNUM *Xp2, + const BIGNUM *Xp, + const BIGNUM *e, BN_CTX *ctx, + BN_GENCB *cb); + BN_MONT_CTX *BN_MONT_CTX_new(void ); void BN_MONT_CTX_init(BN_MONT_CTX *ctx); int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b, @@ -752,12 +763,12 @@ int RAND_pseudo_bytes(unsigned char *buf,int num); #define bn_correct_top(a) \ { \ BN_ULONG *ftl; \ - int __top = (a)->top; \ - if (__top > 0) \ + int tmp_top = (a)->top; \ + if (tmp_top > 0) \ { \ - for (ftl= &((a)->d[__top-1]); __top > 0; __top--) \ + for (ftl= &((a)->d[tmp_top-1]); tmp_top > 0; tmp_top--) \ if (*(ftl--)) break; \ - (a)->top = __top; \ + (a)->top = tmp_top; \ } \ bn_pollute(a); \ }