• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/openssl/crypto/bn/

Lines Matching refs:BIGNUM

290  * get a clone of a BIGNUM with changed flags, for *temporary* use only (the
304 typedef struct bignum_st BIGNUM;
326 BIGNUM RR; /* used to convert to montgomery form */
327 BIGNUM N; /* The modulus */
328 BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 (Ni is only
341 BIGNUM N; /* the divisor */
342 BIGNUM Nr; /* the reciprocal */
411 BIGNUM *_tmp_bn = (a); \
421 const BIGNUM *BN_value_one(void);
429 BIGNUM *BN_CTX_get(BN_CTX *ctx);
431 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
432 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
433 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
434 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
435 int BN_num_bits(const BIGNUM *a);
437 BIGNUM *BN_new(void);
438 void BN_init(BIGNUM *);
439 void BN_clear_free(BIGNUM *a);
440 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
441 void BN_swap(BIGNUM *a, BIGNUM *b);
442 BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
443 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
444 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
445 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
446 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
447 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
448 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
449 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
450 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
451 int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
452 /** BN_set_negative sets sign of a BIGNUM
453 * \param b pointer to the BIGNUM object
454 * \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise
456 void BN_set_negative(BIGNUM *b, int n);
457 /** BN_is_negative returns 1 if the BIGNUM is negative
458 * \param a pointer to the BIGNUM object
463 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
466 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
467 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
469 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
470 const BIGNUM *m);
471 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
473 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
474 const BIGNUM *m);
475 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
477 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
478 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
479 int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
480 int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
482 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
484 BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
485 BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
486 int BN_mul_word(BIGNUM *a, BN_ULONG w);
487 int BN_add_word(BIGNUM *a, BN_ULONG w);
488 int BN_sub_word(BIGNUM *a, BN_ULONG w);
489 int BN_set_word(BIGNUM *a, BN_ULONG w);
490 BN_ULONG BN_get_word(const BIGNUM *a);
492 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
493 void BN_free(BIGNUM *a);
494 int BN_is_bit_set(const BIGNUM *a, int n);
495 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
496 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
497 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
499 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
500 const BIGNUM *m, BN_CTX *ctx);
501 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
502 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
503 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
504 const BIGNUM *m, BN_CTX *ctx,
506 int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
507 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
508 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
509 const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
511 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
512 const BIGNUM *m, BN_CTX *ctx);
514 int BN_mask_bits(BIGNUM *a, int n);
516 int BN_print_fp(FILE *fp, const BIGNUM *a);
519 int BN_print(BIO *fp, const BIGNUM *a);
521 int BN_print(void *fp, const BIGNUM *a);
523 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
524 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
525 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
526 void BN_clear(BIGNUM *a);
527 BIGNUM *BN_dup(const BIGNUM *a);
528 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
529 int BN_set_bit(BIGNUM *a, int n);
530 int BN_clear_bit(BIGNUM *a, int n);
531 char *BN_bn2hex(const BIGNUM *a);
532 char *BN_bn2dec(const BIGNUM *a);
533 int BN_hex2bn(BIGNUM **a, const char *str);
534 int BN_dec2bn(BIGNUM **a, const char *str);
535 int BN_asc2bn(BIGNUM **a, const char *str);
536 int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
537 int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
540 BIGNUM *BN_mod_inverse(BIGNUM *ret,
541 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
542 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
543 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
545 void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
549 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
550 const BIGNUM *add, const BIGNUM *rem,
552 int BN_is_prime(const BIGNUM *p, int nchecks,
555 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
561 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
562 const BIGNUM *rem, BN_GENCB *cb);
563 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
564 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
567 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
569 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
570 const BIGNUM *Xp, const BIGNUM *Xp1,
571 const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
573 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
574 BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
579 int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
583 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a,
586 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
589 const BIGNUM *mod, BN_CTX *ctx);
595 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
598 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
599 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
600 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
601 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
611 const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
612 int (*bn_mod_exp) (BIGNUM *r,
613 const BIGNUM *a,
614 const BIGNUM *p,
615 const BIGNUM *m,
628 int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
629 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
631 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
632 const BIGNUM *m, BN_CTX *ctx);
633 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
640 * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
648 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
653 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
655 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
656 const BIGNUM *p, BN_CTX *ctx);
658 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
660 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
662 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
663 const BIGNUM *p, BN_CTX *ctx);
665 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
666 const BIGNUM *p, BN_CTX *ctx);
668 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
671 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
681 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
683 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
686 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
689 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
692 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
695 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
698 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
701 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
703 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
704 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
711 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
712 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
713 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
714 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
715 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
717 const BIGNUM *BN_get0_nist_prime_192(void);
718 const BIGNUM *BN_get0_nist_prime_224(void);
719 const BIGNUM *BN_get0_nist_prime_256(void);
720 const BIGNUM *BN_get0_nist_prime_384(void);
721 const BIGNUM *BN_get0_nist_prime_521(void);
737 BIGNUM *bn_expand2(BIGNUM *a, int words);
739 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
784 const BIGNUM *_bnum1 = (a); \
806 const BIGNUM *_bnum2 = (a); \
819 const BIGNUM *_bnum2 = (bn); \
859 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
860 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
863 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
864 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
865 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
866 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
867 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
868 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
870 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);