• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/openssl-0.9.8e/include/openssl/

Lines Matching refs:BIGNUM

256 /* get a clone of a BIGNUM with changed flags, for *temporary* use only
269 typedef struct bignum_st BIGNUM;
292 BIGNUM RR; /* used to convert to montgomery form */
293 BIGNUM N; /* The modulus */
294 BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1
305 BIGNUM N; /* the divisor */
306 BIGNUM Nr; /* the reciprocal */
374 BIGNUM *_tmp_bn = (a); \
384 const BIGNUM *BN_value_one(void);
392 BIGNUM *BN_CTX_get(BN_CTX *ctx);
394 int BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
395 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
396 int BN_rand_range(BIGNUM *rnd, BIGNUM *range);
397 int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range);
398 int BN_num_bits(const BIGNUM *a);
400 BIGNUM *BN_new(void);
401 void BN_init(BIGNUM *);
402 void BN_clear_free(BIGNUM *a);
403 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
404 void BN_swap(BIGNUM *a, BIGNUM *b);
405 BIGNUM *BN_bin2bn(const unsigned char *s,int len,BIGNUM *ret);
406 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
407 BIGNUM *BN_mpi2bn(const unsigned char *s,int len,BIGNUM *ret);
408 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
409 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
410 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
411 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
412 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
413 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
414 int BN_sqr(BIGNUM *r, const BIGNUM *a,BN_CTX *ctx);
415 /** BN_set_negative sets sign of a BIGNUM
416 * \param b pointer to the BIGNUM object
417 * \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise
419 void BN_set_negative(BIGNUM *b, int n);
420 /** BN_is_negative returns 1 if the BIGNUM is negative
421 * \param a pointer to the BIGNUM object
426 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
429 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
430 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
431 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m);
432 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
433 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m);
434 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
435 const BIGNUM *m, BN_CTX *ctx);
436 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
437 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
438 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
439 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, BN_CTX *ctx);
440 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
442 BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
443 BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
444 int BN_mul_word(BIGNUM *a, BN_ULONG w);
445 int BN_add_word(BIGNUM *a, BN_ULONG w);
446 int BN_sub_word(BIGNUM *a, BN_ULONG w);
447 int BN_set_word(BIGNUM *a, BN_ULONG w);
448 BN_ULONG BN_get_word(const BIGNUM *a);
450 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
451 void BN_free(BIGNUM *a);
452 int BN_is_bit_set(const BIGNUM *a, int n);
453 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
454 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
455 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,BN_CTX *ctx);
457 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
458 const BIGNUM *m,BN_CTX *ctx);
459 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
460 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
461 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
462 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont);
463 int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
464 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
465 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
466 const BIGNUM *a2, const BIGNUM *p2,const BIGNUM *m,
468 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
469 const BIGNUM *m,BN_CTX *ctx);
471 int BN_mask_bits(BIGNUM *a,int n);
473 int BN_print_fp(FILE *fp, const BIGNUM *a);
476 int BN_print(BIO *fp, const BIGNUM *a);
478 int BN_print(void *fp, const BIGNUM *a);
480 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
481 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
482 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
483 void BN_clear(BIGNUM *a);
484 BIGNUM *BN_dup(const BIGNUM *a);
485 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
486 int BN_set_bit(BIGNUM *a, int n);
487 int BN_clear_bit(BIGNUM *a, int n);
488 char * BN_bn2hex(const BIGNUM *a);
489 char * BN_bn2dec(const BIGNUM *a);
490 int BN_hex2bn(BIGNUM **a, const char *str);
491 int BN_dec2bn(BIGNUM **a, const char *str);
492 int BN_gcd(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx);
493 int BN_kronecker(const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); /* returns -2 for error */
494 BIGNUM *BN_mod_inverse(BIGNUM *ret,
495 const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
496 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
497 const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
501 BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe,
502 const BIGNUM *add, const BIGNUM *rem,
504 int BN_is_prime(const BIGNUM *p,int nchecks,
507 int BN_is_prime_fasttest(const BIGNUM *p,int nchecks,
513 int BN_generate_prime_ex(BIGNUM *ret,int bits,int safe, const BIGNUM *add,
514 const BIGNUM *rem, BN_GENCB *cb);
515 int BN_is_prime_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, BN_GENCB *cb);
516 int BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx,
521 int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,
525 int BN_from_montgomery(BIGNUM *r,const BIGNUM *a,
528 int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *mod,BN_CTX *ctx);
531 const BIGNUM *mod, BN_CTX *ctx);
537 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
540 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
541 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
542 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
543 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *);
549 const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
550 int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
551 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx),
562 int BN_RECP_CTX_set(BN_RECP_CTX *recp,const BIGNUM *rdiv,BN_CTX *ctx);
563 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
565 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
566 const BIGNUM *m, BN_CTX *ctx);
567 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
572 * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
579 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); /*r = a + b*/
581 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p); /*r=a mod p*/
582 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
583 const BIGNUM *p, BN_CTX *ctx); /* r = (a * b) mod p */
584 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
586 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p,
588 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
589 const BIGNUM *p, BN_CTX *ctx); /* r = (a / b) mod p */
590 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
591 const BIGNUM *p, BN_CTX *ctx); /* r = (a ^ b) mod p */
592 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
594 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
602 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[]);
604 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
606 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[],
608 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const unsigned int p[],
610 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
612 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
614 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
616 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
618 int BN_GF2m_poly2arr(const BIGNUM *a, unsigned int p[], int max);
619 int BN_GF2m_arr2poly(const unsigned int p[], BIGNUM *a);
623 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
624 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
625 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
626 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
627 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
629 const BIGNUM *BN_get0_nist_prime_192(void);
630 const BIGNUM *BN_get0_nist_prime_224(void);
631 const BIGNUM *BN_get0_nist_prime_256(void);
632 const BIGNUM *BN_get0_nist_prime_384(void);
633 const BIGNUM *BN_get0_nist_prime_521(void);
640 BIGNUM *bn_expand2(BIGNUM *a, int words);
642 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
686 const BIGNUM *_bnum1 = (a); \
707 const BIGNUM *_bnum2 = (a); \
744 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
745 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
748 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
749 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
750 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
751 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
752 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
753 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
755 int BN_bntest_rand(BIGNUM *rnd, int bits, int top,int bottom);