• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/openssl-1.0.0q/crypto/bn/

Lines Matching refs:BIGNUM

296 /* get a clone of a BIGNUM with changed flags, for *temporary* use only
309 typedef struct bignum_st BIGNUM;
332 BIGNUM RR; /* used to convert to montgomery form */
333 BIGNUM N; /* The modulus */
334 BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1
346 BIGNUM N; /* the divisor */
347 BIGNUM Nr; /* the reciprocal */
415 BIGNUM *_tmp_bn = (a); \
425 const BIGNUM *BN_value_one(void);
433 BIGNUM *BN_CTX_get(BN_CTX *ctx);
435 int BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
436 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom);
437 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
438 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
439 int BN_num_bits(const BIGNUM *a);
441 BIGNUM *BN_new(void);
442 void BN_init(BIGNUM *);
443 void BN_clear_free(BIGNUM *a);
444 BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
445 void BN_swap(BIGNUM *a, BIGNUM *b);
446 BIGNUM *BN_bin2bn(const unsigned char *s,int len,BIGNUM *ret);
447 int BN_bn2bin(const BIGNUM *a, unsigned char *to);
448 BIGNUM *BN_mpi2bn(const unsigned char *s,int len,BIGNUM *ret);
449 int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
450 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
451 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
452 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
453 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
454 int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
455 int BN_sqr(BIGNUM *r, const BIGNUM *a,BN_CTX *ctx);
456 /** BN_set_negative sets sign of a BIGNUM
457 * \param b pointer to the BIGNUM object
458 * \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise
460 void BN_set_negative(BIGNUM *b, int n);
461 /** BN_is_negative returns 1 if the BIGNUM is negative
462 * \param a pointer to the BIGNUM object
467 int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
470 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
471 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
472 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m);
473 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
474 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m);
475 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
476 const BIGNUM *m, BN_CTX *ctx);
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, BN_CTX *ctx);
481 int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
483 BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
484 BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
485 int BN_mul_word(BIGNUM *a, BN_ULONG w);
486 int BN_add_word(BIGNUM *a, BN_ULONG w);
487 int BN_sub_word(BIGNUM *a, BN_ULONG w);
488 int BN_set_word(BIGNUM *a, BN_ULONG w);
489 BN_ULONG BN_get_word(const BIGNUM *a);
491 int BN_cmp(const BIGNUM *a, const BIGNUM *b);
492 void BN_free(BIGNUM *a);
493 int BN_is_bit_set(const BIGNUM *a, int n);
494 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
495 int BN_lshift1(BIGNUM *r, const BIGNUM *a);
496 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,BN_CTX *ctx);
498 int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
499 const BIGNUM *m,BN_CTX *ctx);
500 int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
501 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
502 int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
503 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont);
504 int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
505 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
506 int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
507 const BIGNUM *a2, const BIGNUM *p2,const BIGNUM *m,
509 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
510 const BIGNUM *m,BN_CTX *ctx);
512 int BN_mask_bits(BIGNUM *a,int n);
514 int BN_print_fp(FILE *fp, const BIGNUM *a);
517 int BN_print(BIO *fp, const BIGNUM *a);
519 int BN_print(void *fp, const BIGNUM *a);
521 int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
522 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
523 int BN_rshift1(BIGNUM *r, const BIGNUM *a);
524 void BN_clear(BIGNUM *a);
525 BIGNUM *BN_dup(const BIGNUM *a);
526 int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
527 int BN_set_bit(BIGNUM *a, int n);
528 int BN_clear_bit(BIGNUM *a, int n);
529 char * BN_bn2hex(const BIGNUM *a);
530 char * BN_bn2dec(const BIGNUM *a);
531 int BN_hex2bn(BIGNUM **a, const char *str);
532 int BN_dec2bn(BIGNUM **a, const char *str);
533 int BN_asc2bn(BIGNUM **a, const char *str);
534 int BN_gcd(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx);
535 int BN_kronecker(const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); /* returns -2 for error */
536 BIGNUM *BN_mod_inverse(BIGNUM *ret,
537 const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
538 BIGNUM *BN_mod_sqrt(BIGNUM *ret,
539 const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
541 void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
545 BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe,
546 const BIGNUM *add, const BIGNUM *rem,
548 int BN_is_prime(const BIGNUM *p,int nchecks,
551 int BN_is_prime_fasttest(const BIGNUM *p,int nchecks,
557 int BN_generate_prime_ex(BIGNUM *ret,int bits,int safe, const BIGNUM *add,
558 const BIGNUM *rem, BN_GENCB *cb);
559 int BN_is_prime_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx, BN_GENCB *cb);
560 int BN_is_prime_fasttest_ex(const BIGNUM *p,int nchecks, BN_CTX *ctx,
565 int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b,
569 int BN_from_montgomery(BIGNUM *r,const BIGNUM *a,
572 int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *mod,BN_CTX *ctx);
575 const BIGNUM *mod, BN_CTX *ctx);
581 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
584 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
585 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
586 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
587 int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *);
596 const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
597 int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
598 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx),
609 int BN_RECP_CTX_set(BN_RECP_CTX *recp,const BIGNUM *rdiv,BN_CTX *ctx);
610 int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
612 int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
613 const BIGNUM *m, BN_CTX *ctx);
614 int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
619 * The BIGNUM::neg property of BIGNUMs representing binary polynomials is
626 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); /*r = a + b*/
628 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p); /*r=a mod p*/
629 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
630 const BIGNUM *p, BN_CTX *ctx); /* r = (a * b) mod p */
631 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
633 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p,
635 int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
636 const BIGNUM *p, BN_CTX *ctx); /* r = (a / b) mod p */
637 int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
638 const BIGNUM *p, BN_CTX *ctx); /* r = (a ^ b) mod p */
639 int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
641 int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
649 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
651 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
653 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
655 int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
657 int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
659 int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
661 int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
663 int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
665 int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
666 int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
670 int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
671 int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
672 int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
673 int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
674 int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
676 const BIGNUM *BN_get0_nist_prime_192(void);
677 const BIGNUM *BN_get0_nist_prime_224(void);
678 const BIGNUM *BN_get0_nist_prime_256(void);
679 const BIGNUM *BN_get0_nist_prime_384(void);
680 const BIGNUM *BN_get0_nist_prime_521(void);
687 BIGNUM *bn_expand2(BIGNUM *a, int words);
689 BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */
733 const BIGNUM *_bnum1 = (a); \
754 const BIGNUM *_bnum2 = (a); \
767 const BIGNUM *_bnum2 = (bn); \
802 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn);
803 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);
806 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);
807 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);
808 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);
809 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);
810 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);
811 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);
813 int BN_bntest_rand(BIGNUM *rnd, int bits, int top,int bottom);