X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbn%2Fbn.h;h=7fe78bb774fb963a732628b0f3fa544bb35e0e55;hb=7b1a04519fa038b51773c1214e267c8ad7fd5981;hp=2333682a1738364be61cc5874dc05f2576a0d657;hpb=ae7ec4c71de74fa52c5d89e32e28445c6602990d;p=oweals%2Fopenssl.git diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index 2333682a17..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 _t371q = (a)->top; \ - if (_t371q > 0) \ + int tmp_top = (a)->top; \ + if (tmp_top > 0) \ { \ - for (ftl= &((a)->d[_t371q-1]); _t371q > 0; _t371q--) \ + for (ftl= &((a)->d[tmp_top-1]); tmp_top > 0; tmp_top--) \ if (*(ftl--)) break; \ - (a)->top = _t371q; \ + (a)->top = tmp_top; \ } \ bn_pollute(a); \ }