~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to crypto/bn/bn.h

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
303
303
        BIGNUM N;      /* The modulus */
304
304
        BIGNUM Ni;     /* R*(1/R mod N) - N*Ni = 1
305
305
                        * (Ni is only stored for bignum algorithm) */
 
306
#if 0
 
307
        /* OpenSSL 0.9.9 preview: */
 
308
        BN_ULONG n0[2];/* least significant word(s) of Ni */
 
309
#else
306
310
        BN_ULONG n0;   /* least significant word of Ni */
 
311
#endif
307
312
        int flags;
308
313
        };
309
314
 
403
408
void    BN_CTX_end(BN_CTX *ctx);
404
409
int     BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
405
410
int     BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
406
 
int     BN_rand_range(BIGNUM *rnd, BIGNUM *range);
407
 
int     BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range);
 
411
int     BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
 
412
int     BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
408
413
int     BN_num_bits(const BIGNUM *a);
409
414
int     BN_num_bits_word(BN_ULONG);
410
415
BIGNUM *BN_new(void);
526
531
int     BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx,
527
532
                int do_trial_division, BN_GENCB *cb);
528
533
 
 
534
int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
 
535
 
 
536
int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
 
537
                        const BIGNUM *Xp, const BIGNUM *Xp1, const BIGNUM *Xp2,
 
538
                        const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb);
 
539
int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
 
540
                        BIGNUM *Xp1, BIGNUM *Xp2,
 
541
                        const BIGNUM *Xp,
 
542
                        const BIGNUM *e, BN_CTX *ctx,
 
543
                        BN_GENCB *cb);
 
544
 
529
545
BN_MONT_CTX *BN_MONT_CTX_new(void );
530
546
void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
531
547
int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,