BIGNUM
BIGNUM *r = NULL;
BIGNUM *p = NULL, *g = NULL;
const BIGNUM *pub_key, *priv_key;
BIGNUM *dh_pub = NULL;
BIGNUM *p = NULL, *g = NULL, *pub_key = NULL, *priv_key = NULL;
eay_v2bn(BIGNUM **bn, vchar_t *var)
eay_bn2v(vchar_t **var, BIGNUM *bn)
BIGNUM *exp = NULL, *mod;
bignum_pubkey2rsa(BIGNUM *in)
BIGNUM *bn = BN_new();
RSA *bignum_pubkey2rsa(BIGNUM *);
extern int eay_v2bn(BIGNUM **, vchar_t *);
extern int eay_bn2v(vchar_t **, BIGNUM *);
BIGNUM *e;
BIGNUM *bn;
static BIGNUM *bn_n = NULL; /* Modulus */
static BIGNUM *bn_e = NULL; /* Public Exponent */
static BIGNUM *bn_d = NULL; /* Private Exponent */
static BIGNUM *bn_p = NULL; /* Prime1 */
static BIGNUM *bn_q = NULL; /* Prime2 */
static BIGNUM *bn_dmp1 = NULL; /* Exponent1 */
static BIGNUM *bn_dmq1 = NULL; /* Exponent2 */
static BIGNUM *bn_iqmp = NULL; /* Coefficient */
const BIGNUM *d;
#define BN_new() calloc(sizeof(BIGNUM), 1)
static BIGNUM *BN_dup(const BIGNUM *);
static int BN_dec2bn(BIGNUM **, const char *);
static int BN_hex2bn(BIGNUM **, const char *);
static BN_ULONG BN_div_word(BIGNUM *, BN_ULONG);
static void BN_print_fp(FILE *, const BIGNUM *);
static void BN_print_dec_fp(FILE *, const BIGNUM *);
static void convert_str2bn(BIGNUM **, char *);
static void pr_fact(BIGNUM *, int, int); /* print factors of a value */
static void pr_print(BIGNUM *, int, int); /* print a prime */
BIGNUM *val;
pr_fact(BIGNUM *val, int hflag, int xflag)
BIGNUM *bnfact;
pr_print(BIGNUM *val, int hflag, int xflag)
static BIGNUM *sval;
BIGNUM *pval;
pollard_pminus1(BIGNUM *val, int hflag, int xflag)
BIGNUM *base, *rbase, *num, *i, *x;
BN_print_dec_fp(FILE *fp, const BIGNUM *num)
BN_print_fp(FILE *fp, const BIGNUM *num)
BN_print_dec_fp(FILE *fp, const BIGNUM *num)
BN_dec2bn(BIGNUM **a, const char *str)
BN_hex2bn(BIGNUM **a, const char *str)
BN_div_word(BIGNUM *a, BN_ULONG b)
static BIGNUM *
BN_dup(const BIGNUM *a)
BIGNUM *b = BN_new();
convert_str2bn(BIGNUM **val, char *p)
static void pollard_pminus1(BIGNUM *, int, int);
extractdeskey(BIGNUM *ck, DesData *deskey)
BIGNUM *a = BN_new();
BIGNUM *z = BN_new();
BIGNUM *base = BN_new();
BIGNUM *public = BN_new();
BIGNUM *secret = BN_new();
BIGNUM *common = BN_new();
BIGNUM *modulus = BN_new();
BIGNUM *pk = BN_new();
BIGNUM *sk = BN_new();
BIGNUM *tmp = BN_new();
BIGNUM *base = BN_new();
BIGNUM *root = BN_new();
BIGNUM *modulus = BN_new();
extractideakey(BIGNUM *ck, IdeaData *ideakey)
BIGNUM *a = BN_new();
BIGNUM *z = BN_new();
BIGNUM *base = BN_new();
mp_copy(BIGNUM *a, BIGNUM *b)
formatbn(const BIGNUM *a, const int radix)
getbn(BIGNUM **a, const char *str, int radix)
BIGNUM *
BN_bin2bn(const uint8_t *data, int len, BIGNUM *ret)
BN_bn2bin(const BIGNUM *a, unsigned char *b)
BIGNUM t;
BN_init(BIGNUM *a)
BIGNUM *
BIGNUM *a;
BN_copy(BIGNUM *b, const BIGNUM *a)
BIGNUM *
BN_dup(const BIGNUM *a)
BIGNUM *ret;
BN_swap(BIGNUM *a, BIGNUM *b)
BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
BN_lshift1(BIGNUM *r, BIGNUM *a)
BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
BN_rshift1(BIGNUM *r, BIGNUM *a)
BN_set_word(BIGNUM *a, BN_ULONG w)
BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *a, const BIGNUM *d, BN_CTX *ctx)
BN_bitop(BIGNUM *r, const BIGNUM *a, char op, const BIGNUM *b)
BN_free(BIGNUM *a)
BN_clear(BIGNUM *a)
BN_clear_free(BIGNUM *a)
BN_num_bytes(const BIGNUM *a)
BN_num_bits(const BIGNUM *a)
BN_set_negative(BIGNUM *a, int n)
BN_cmp(BIGNUM *a, BIGNUM *b)
BN_mod_exp(BIGNUM *Y, BIGNUM *G, BIGNUM *X, BIGNUM *P, BN_CTX *ctx)
BIGNUM *
BN_mod_inverse(BIGNUM *r, BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx)
BIGNUM *
BN_bn2hex(const BIGNUM *a)
BN_bn2dec(const BIGNUM *a)
BN_bn2radix(const BIGNUM *a, unsigned radix)
BN_print_fp(FILE *fp, const BIGNUM *a)
BN_rand(BIGNUM *rnd, int bits, int top, int bottom)
BN_rand_range(BIGNUM *rnd, BIGNUM *range)
BN_is_prime(const BIGNUM *a, int checks, void (*callback)(int, int, void *), BN_CTX *ctx, void *cb_arg)
const BIGNUM *
static const BIGNUM one = { &digit, 1, 1, 0 };
BN_hex2bn(BIGNUM **a, const char *str)
BN_dec2bn(BIGNUM **a, const char *str)
BN_radix2bn(BIGNUM **a, const char *str, unsigned radix)
BN_mod_sub(BIGNUM *r, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx)
BN_is_bit_set(const BIGNUM *a, int n)
BN_raise(BIGNUM *res, BIGNUM *a, BIGNUM *b)
BIGNUM *power;
BIGNUM *temp;
BN_factorial(BIGNUM *res, BIGNUM *f)
BIGNUM *one;
BIGNUM *i;
BN_gcd(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
int BN_bn2bin(const BIGNUM */*a*/, unsigned char */*b*/);
char *BN_bn2hex(const BIGNUM */*a*/);
char *BN_bn2dec(const BIGNUM */*a*/);
char *BN_bn2radix(const BIGNUM */*a*/, unsigned /*radix*/);
int BN_hex2bn(BIGNUM **/*a*/, const char */*str*/);
int BN_dec2bn(BIGNUM **/*a*/, const char */*str*/);
int BN_radix2bn(BIGNUM **/*a*/, const char */*str*/, unsigned /*radix*/);
int BN_print_fp(FILE */*fp*/, const BIGNUM */*a*/);
int BN_add(BIGNUM */*r*/, const BIGNUM */*a*/, const BIGNUM */*b*/);
int BN_sub(BIGNUM */*r*/, const BIGNUM */*a*/, const BIGNUM */*b*/);
int BN_mul(BIGNUM */*r*/, const BIGNUM */*a*/, const BIGNUM */*b*/, BN_CTX */*ctx*/);
int BN_div(BIGNUM */*q*/, BIGNUM */*r*/, const BIGNUM */*a*/, const BIGNUM */*b*/, BN_CTX */*ctx*/);
void BN_swap(BIGNUM */*a*/, BIGNUM */*b*/);
int BN_bitop(BIGNUM */*r*/, const BIGNUM */*a*/, char /*op*/, const BIGNUM */*b*/);
int BN_lshift(BIGNUM */*r*/, const BIGNUM */*a*/, int /*n*/);
int BN_lshift1(BIGNUM */*r*/, BIGNUM */*a*/);
int BN_rshift(BIGNUM */*r*/, const BIGNUM */*a*/, int /*n*/);
int BN_rshift1(BIGNUM */*r*/, BIGNUM */*a*/);
int BN_set_word(BIGNUM */*a*/, BN_ULONG /*w*/);
void BN_set_negative(BIGNUM */*a*/, int /*n*/);
int BN_num_bytes(const BIGNUM */*a*/);
int BN_num_bits(const BIGNUM */*a*/);
int BN_mod_exp(BIGNUM */*r*/, BIGNUM */*a*/, BIGNUM */*p*/, BIGNUM */*m*/, BN_CTX */*ctx*/);
BIGNUM *BN_mod_inverse(BIGNUM */*ret*/, BIGNUM */*a*/, const BIGNUM */*n*/, BN_CTX */*ctx*/);
int BN_mod_mul(BIGNUM */*ret*/, BIGNUM */*a*/, BIGNUM */*b*/, const BIGNUM */*m*/, BN_CTX */*ctx*/);
int BN_mod_sub(BIGNUM */*r*/, BIGNUM */*a*/, BIGNUM */*b*/, const BIGNUM */*m*/, BN_CTX */*ctx*/);
int BN_raise(BIGNUM */*res*/, BIGNUM */*a*/, BIGNUM */*b*/);
int BN_factorial(BIGNUM */*fact*/, BIGNUM */*f*/);
BIGNUM *BN_CTX_get(BN_CTX */*ctx*/);
int BN_rand(BIGNUM */*rnd*/, int /*bits*/, int /*top*/, int /*bottom*/);
int BN_rand_range(BIGNUM */*rnd*/, BIGNUM */*range*/);
int BN_is_prime(const BIGNUM */*a*/, int /*checks*/, void (*callback)(int, int, void *), BN_CTX */*ctx*/, void */*cb_arg*/);
const BIGNUM *BN_value_one(void);
int BN_is_bit_set(const BIGNUM */*a*/, int /*n*/);
int BN_gcd(BIGNUM */*r*/, BIGNUM */*a*/, BIGNUM */*b*/, BN_CTX */*ctx*/);
int humanize_bignum(char *, size_t, const BIGNUM *, const char *, int, int);
BIGNUM **v;
BIGNUM *BN_new(void);
BIGNUM *BN_dup(const BIGNUM */*a*/);
int BN_copy(BIGNUM */*b*/, const BIGNUM */*a*/);
void BN_init(BIGNUM */*a*/);
void BN_free(BIGNUM */*a*/);
void BN_clear(BIGNUM */*a*/);
void BN_clear_free(BIGNUM */*a*/);
int BN_cmp(BIGNUM */*a*/, BIGNUM */*b*/);
BIGNUM *BN_bin2bn(const uint8_t */*buf*/, int /*size*/, BIGNUM */*bn*/);
humanize_bignum(char *buf, size_t len, const BIGNUM *bytes, const char *suffix,
const BIGNUM *divisor, *post;
BIGNUM *nbytes = NULL, *max = NULL;
BIGNUM *t1 = NULL, *t2 = NULL;
static const BIGNUM *
static const BIGNUM bn = { &digit, 1, 1, 0 };
static const BIGNUM *
static const BIGNUM bn = { &digit, 1, 1, 0 };
static const BIGNUM *
static const BIGNUM bn = { &digit, 1, 1, 0 };
static const BIGNUM *
static const BIGNUM bn = { &digit, 1, 1, 0 };
static const BIGNUM *
static const BIGNUM bn = { &digit, 1, 1, 0 };
static const BIGNUM *
static const BIGNUM bn = { &digit, 1, 1, 0 };
static const BIGNUM *
static const BIGNUM bn = { &digit, 1, 1, 0 };
BIGNUM *bn = BN_bin2bn(tmp, sizeof(tmp), NULL);
unit_string(BIGNUM *bn, const char *unit, long scale, char *out, size_t len)
BIGNUM *sn;
static void bug(const char *m, BIGNUM *a, BIGNUM *b)
BIGNUM *a = BN_new(), *b = BN_new(), *c = BN_new(), *d = BN_new(),
BIGNUM *x_a = NULL, *y_a = NULL, *x_b = NULL, *y_b = NULL;
BIGNUM *priv = NULL;
static bool bsqrt_stop(const BIGNUM *, const BIGNUM *, u_int *);
BIGNUM *i, *f;
BIGNUM *one;
bsqrt_stop(const BIGNUM *x, const BIGNUM *y, u_int *onecount)
BIGNUM *r;
BIGNUM *x, *y;
pbn(const char *str, const BIGNUM *n)
scale_number(BIGNUM *n, int s)
BIGNUM *a, *p;
split_number(const struct number *n, BIGNUM *i, BIGNUM *f)
BIGNUM *a, *p;
BIGNUM *number;
void scale_number(BIGNUM *, int);
void pbn(const char *, const BIGNUM *);
void split_number(const struct number *, BIGNUM *, BIGNUM *);
BIGNUM *mult, *stop;
BIGNUM *v;
BIGNUM *q, *p, *a;
uint32_t osize, uint32_t ogenerator, BIGNUM * omodulus)
BIGNUM *);
static BIGNUM *largebase;
BIGNUM *q;
BIGNUM *a;
BIGNUM *p, *g;