Lines Matching refs:BIGNUM

218 #ifdef BIGNUM
219 #undef BIGNUM
236 } BIGNUM;
244 BIGNUM bn[BN_CTX_NUM];
255 BIGNUM RR; /* used to convert to montgomery form */
256 BIGNUM N; /* The modulus */
257 BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1
268 BIGNUM N; /* the divisor */
269 BIGNUM Nr; /* the reciprocal */
307 BIGNUM *BN_value_one(void);
313 BIGNUM *BN_CTX_get(BN_CTX *ctx);
315 int BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
316 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
317 int BN_num_bits(const BIGNUM *a);
319 BIGNUM *BN_new(void);
320 void BN_init(BIGNUM *);
321 void BN_clear_free(BIGNUM *a);
322 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
323 BIGNUM *BN_bin2bn(const unsigned char *s,int len,BIGNUM *ret);
324 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
325 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
326 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
327 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
328 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
329 int BN_mod(BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
330 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
332 int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
333 int BN_sqr(BIGNUM *r, BIGNUM *a,BN_CTX *ctx);
334 BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
335 BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
336 int BN_mul_word(BIGNUM *a, BN_ULONG w);
337 int BN_add_word(BIGNUM *a, BN_ULONG w);
338 int BN_sub_word(BIGNUM *a, BN_ULONG w);
339 int BN_set_word(BIGNUM *a, BN_ULONG w);
340 BN_ULONG BN_get_word(BIGNUM *a);
341 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
342 void BN_free(BIGNUM *a);
343 int BN_is_bit_set(const BIGNUM *a, int n);
344 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
345 int BN_lshift1(BIGNUM *r, BIGNUM *a);
346 int BN_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p,BN_CTX *ctx);
347 int BN_mod_exp(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
348 const BIGNUM *m,BN_CTX *ctx);
349 int BN_mod_exp_mont(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
350 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
351 int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
352 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
353 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
354 const BIGNUM *m,BN_CTX *ctx);
355 int BN_mask_bits(BIGNUM *a,int n);
356 int BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
357 int BN_reciprocal(BIGNUM *r, BIGNUM *m, int len, BN_CTX *ctx);
358 int BN_rshift(BIGNUM *r, BIGNUM *a, int n);
359 int BN_rshift1(BIGNUM *r, BIGNUM *a);
360 void BN_clear(BIGNUM *a);
361 BIGNUM *BN_dup(const BIGNUM *a);
362 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
363 int BN_set_bit(BIGNUM *a, int n);
364 int BN_clear_bit(BIGNUM *a, int n);
365 int BN_gcd(BIGNUM *r,BIGNUM *in_a,BIGNUM *in_b,BN_CTX *ctx);
366 BIGNUM *BN_mod_inverse(BIGNUM *ret,BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
367 BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe,BIGNUM *add,
368 BIGNUM *rem,void (*callback)(int,int,void *),void *cb_arg);
369 int BN_is_prime(const BIGNUM *p,int nchecks,
372 int BN_is_prime_fasttest(const BIGNUM *p,int nchecks,
378 int BN_mod_mul_montgomery(BIGNUM *r,BIGNUM *a,BIGNUM *b,BN_MONT_CTX *mont,
380 int BN_from_montgomery(BIGNUM *r,BIGNUM *a,BN_MONT_CTX *mont,BN_CTX *ctx);
382 int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *modulus,BN_CTX *ctx);
391 int BN_RECP_CTX_set(BN_RECP_CTX *recp,const BIGNUM *rdiv,BN_CTX *ctx);
392 int BN_mod_mul_reciprocal(BIGNUM *r, BIGNUM *x, BIGNUM *y,
394 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
395 const BIGNUM *m, BN_CTX *ctx);
396 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, BIGNUM *m,
404 BIGNUM *bn_expand2(BIGNUM *a, int words);