/[rdesktop]/sourceforge.net/tags/RDESKTOP-1-3-1/rdesktop/crypto/bn.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/tags/RDESKTOP-1-3-1/rdesktop/crypto/bn.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 112 by matthewc, Sat Sep 7 05:15:35 2002 UTC revision 195 by matthewc, Wed Sep 25 09:00:57 2002 UTC
# Line 103  void xfree(void *mem); Line 103  void xfree(void *mem);
103   * be on.  Again this in only really a problem on machines   * be on.  Again this in only really a problem on machines
104   * using "long long's", are 32bit, and are not using my assembler code. */   * using "long long's", are 32bit, and are not using my assembler code. */
105  #if defined(MSDOS) || defined(WINDOWS) || defined(WIN32) || defined(linux)  #if defined(MSDOS) || defined(WINDOWS) || defined(WIN32) || defined(linux)
106  #define BN_DIV2W  # ifndef BN_DIV2W
107    #  define BN_DIV2W
108    # endif
109  #endif  #endif
110    
111  /* assuming long is 64bit - this is the DEC Alpha  /* assuming long is 64bit - this is the DEC Alpha
# Line 166  void xfree(void *mem); Line 168  void xfree(void *mem);
168  #define BN_BYTES        4  #define BN_BYTES        4
169  #define BN_BITS2        32  #define BN_BITS2        32
170  #define BN_BITS4        16  #define BN_BITS4        16
171  #ifdef WIN32  #ifdef _MSC_VER
172  /* VC++ doesn't like the LL suffix */  /* VC++ doesn't like the LL suffix */
173  #define BN_MASK         (0xffffffffffffffffL)  #define BN_MASK         (0xffffffffffffffffL)
174  #else  #else
# Line 342  void   BN_CTX_end(BN_CTX *ctx); Line 344  void   BN_CTX_end(BN_CTX *ctx);
344  int     BN_rand(BIGNUM *rnd, int bits, int top,int bottom);  int     BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
345  int     BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);  int     BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
346  int     BN_rand_range(BIGNUM *rnd, BIGNUM *range);  int     BN_rand_range(BIGNUM *rnd, BIGNUM *range);
347    int     BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range);
348  int     BN_num_bits(const BIGNUM *a);  int     BN_num_bits(const BIGNUM *a);
349  int     BN_num_bits_word(BN_ULONG);  int     BN_num_bits_word(BN_ULONG);
350  BIGNUM *BN_new(void);  BIGNUM *BN_new(void);
# Line 382  int    BN_mod_exp_mont_word(BIGNUM *r, BN_U Line 385  int    BN_mod_exp_mont_word(BIGNUM *r, BN_U
385                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);                          const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
386  int     BN_mod_exp2_mont(BIGNUM *r, BIGNUM *a1, BIGNUM *p1,BIGNUM *a2,  int     BN_mod_exp2_mont(BIGNUM *r, BIGNUM *a1, BIGNUM *p1,BIGNUM *a2,
387                  BIGNUM *p2,BIGNUM *m,BN_CTX *ctx,BN_MONT_CTX *m_ctx);                  BIGNUM *p2,BIGNUM *m,BN_CTX *ctx,BN_MONT_CTX *m_ctx);
388  int     BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, const BIGNUM *p,  int     BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p,
389          const BIGNUM *m,BN_CTX *ctx);          BIGNUM *m,BN_CTX *ctx);
390  int     BN_mask_bits(BIGNUM *a,int n);  int     BN_mask_bits(BIGNUM *a,int n);
391  int     BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);  int     BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
392  #ifndef NO_FP_API  #ifndef NO_FP_API
# Line 416  int    BN_is_prime(const BIGNUM *p,int nche Line 419  int    BN_is_prime(const BIGNUM *p,int nche
419  int     BN_is_prime_fasttest(const BIGNUM *p,int nchecks,  int     BN_is_prime_fasttest(const BIGNUM *p,int nchecks,
420                  void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg,                  void (*callback)(int,int,void *),BN_CTX *ctx,void *cb_arg,
421                  int do_trial_division);                  int do_trial_division);
 void    ERR_load_BN_strings(void );  
422    
423  BN_MONT_CTX *BN_MONT_CTX_new(void );  BN_MONT_CTX *BN_MONT_CTX_new(void );
424  void BN_MONT_CTX_init(BN_MONT_CTX *ctx);  void BN_MONT_CTX_init(BN_MONT_CTX *ctx);
# Line 487  int BN_bntest_rand(BIGNUM *rnd, int bits Line 489  int BN_bntest_rand(BIGNUM *rnd, int bits
489  }  }
490  #endif  #endif
491  #endif  #endif
   

Legend:
Removed from v.112  
changed lines
  Added in v.195

  ViewVC Help
Powered by ViewVC 1.1.26