Home
last modified time | relevance | path

Searched refs:mp_int (Results 1 – 25 of 136) sorted by relevance

123456

/netbsd-src/crypto/external/bsd/heimdal/dist/lib/hcrypto/libtommath/
H A Dtommath.h184 } mp_int; typedef
199 int mp_init(mp_int *a);
202 void mp_clear(mp_int *a);
205 int mp_init_multi(mp_int *mp, ...);
208 void mp_clear_multi(mp_int *mp, ...);
211 void mp_exch(mp_int *a, mp_int *b);
214 int mp_shrink(mp_int *a);
217 int mp_grow(mp_int *a, int size);
220 int mp_init_size(mp_int *a, int size);
229 void mp_zero(mp_int *a);
[all …]
H A Dbn_mp_submod.c22 mp_submod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_submod()
25 mp_int t; in mp_submod()
H A Dbn_mp_mulmod.c21 int mp_mulmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_mulmod()
24 mp_int t; in mp_mulmod()
H A Dbn_mp_addmod.c22 mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_addmod()
25 mp_int t; in mp_addmod()
H A Dbn_s_mp_exptmod.c25 int s_mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y, int redmode) in s_mp_exptmod()
27 mp_int M[TAB_SIZE], res, mu; in s_mp_exptmod()
30 int (*redux)(mp_int*,mp_int*,mp_int*); in s_mp_exptmod()
H A Dbn_mp_div.c23 int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_div()
25 mp_int ta, tb, tq, q; in mp_div()
105 int mp_div (mp_int * a, mp_int * b, mp_int * c, mp_int * d) in mp_div()
107 mp_int q, x, y, t1, t2; in mp_div()
H A Dbn_mp_exteuclid.c23 int mp_exteuclid(mp_int *a, mp_int *b, mp_int *U1, mp_int *U2, mp_int *U3) in mp_exteuclid()
25 mp_int u1,u2,u3,v1,v2,v3,t1,t2,t3,q,tmp; in mp_exteuclid()
H A Dbn_mp_exptmod.c26 int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y) in mp_exptmod()
38 mp_int tmpG, tmpX; in mp_exptmod()
H A Dbn_mp_sqrmod.c22 mp_sqrmod (mp_int * a, mp_int * b, mp_int * c) in mp_sqrmod()
25 mp_int t; in mp_sqrmod()
H A Dbn_mp_mod.c22 mp_mod (mp_int * a, mp_int * b, mp_int * c) in mp_mod()
24 mp_int t; in mp_mod()
H A Dbn_mp_init_multi.c21 int mp_init_multi(mp_int *mp, ...) in mp_init_multi()
25 mp_int* cur_arg = mp; in mp_init_multi()
44 cur_arg = va_arg(clean_args, mp_int*); in mp_init_multi()
51 cur_arg = va_arg(args, mp_int*); in mp_init_multi()
H A Dbn_mp_xor.c22 mp_xor (mp_int * a, mp_int * b, mp_int * c) in mp_xor()
25 mp_int t, *x; in mp_xor()
/netbsd-src/external/mit/isl/dist/imath/
H A Dimath.h64 } mpz_t, *mp_int; typedef
66 static inline mp_digit* MP_DIGITS(mp_int Z) { return Z->digits; } in MP_DIGITS()
67 static inline mp_size MP_ALLOC(mp_int Z) { return Z->alloc; } in MP_ALLOC()
68 static inline mp_size MP_USED(mp_int Z) { return Z->used; } in MP_USED()
69 static inline mp_sign MP_SIGN(mp_int Z) { return Z->sign; } in MP_SIGN()
108 static inline bool mp_int_is_odd(mp_int z) { return (z->digits[0] & 1) != 0; } in mp_int_is_odd()
111 static inline bool mp_int_is_even(mp_int z) { return (z->digits[0] & 1) == 0; } in mp_int_is_even()
115 mp_result mp_int_init(mp_int z);
119 mp_int mp_int_alloc(void);
124 mp_result mp_int_init_size(mp_int z, mp_size prec);
[all …]
H A Dgmp_compat.h60 void GMPZAPI(abs)(mp_int rop, mp_int op);
63 void GMPZAPI(add)(mp_int rop, mp_int op1, mp_int op2);
66 void GMPZAPI(clear)(mp_int x);
69 int GMPZAPI(cmp_si)(mp_int op1, long op2);
72 int GMPZAPI(cmpabs)(mp_int op1, mp_int op2);
75 int GMPZAPI(cmp)(mp_int op1, mp_int op2);
78 void GMPZAPI(init)(mp_int x);
81 void GMPZAPI(mul)(mp_int rop, mp_int op1, mp_int op2);
84 void GMPZAPI(neg)(mp_int rop, mp_int op);
87 void GMPZAPI(set_si)(mp_int rop, long op);
[all …]
H A Dgmp_compat.c75 void GMPZAPI(abs)(mp_int rop, mp_int op) { CHECK(mp_int_abs(op, rop)); } in GMPZAPI()
78 void GMPZAPI(add)(mp_int rop, mp_int op1, mp_int op2) { in GMPZAPI()
83 void GMPZAPI(clear)(mp_int x) { mp_int_clear(x); } in GMPZAPI()
86 int GMPZAPI(cmp_si)(mp_int op1, long op2) { in GMPZAPI()
91 int GMPZAPI(cmpabs)(mp_int op1, mp_int op2) { in GMPZAPI()
96 int GMPZAPI(cmp)(mp_int op1, mp_int op2) { return mp_int_compare(op1, op2); } in GMPZAPI()
99 void GMPZAPI(init)(mp_int x) { CHECK(mp_int_init(x)); } in GMPZAPI()
102 void GMPZAPI(mul)(mp_int rop, mp_int op1, mp_int op2) { in GMPZAPI()
107 void GMPZAPI(neg)(mp_int rop, mp_int op) { CHECK(mp_int_neg(op, rop)); } in GMPZAPI()
110 void GMPZAPI(set_si)(mp_int rop, long op) { CHECK(mp_int_set_value(rop, op)); } in GMPZAPI()
[all …]
H A Dimath.c111 static inline void CLAMP(mp_int z_) { in CLAMP()
177 static inline int CMPZ(mp_int Z) { in CMPZ()
220 static bool s_pad(mp_int z, mp_size min);
223 static inline mp_result GROW(mp_int Z, mp_size N) { in GROW()
228 static void s_fake(mp_int z, mp_small value, mp_digit vbuf[]);
229 static void s_ufake(mp_int z, mp_usmall value, mp_digit vbuf[]);
238 static int s_ucmp(mp_int a, mp_int b);
241 static int s_vcmp(mp_int a, mp_small v);
242 static int s_uvcmp(mp_int a, mp_usmall uv);
268 static void s_dadd(mp_int a, mp_digit b);
[all …]
H A Dimrat.h44 static inline mp_int MP_NUMER_P(mp_rat Q) { return &(Q->num); } in MP_NUMER_P()
47 static inline mp_int MP_DENOM_P(mp_rat Q) { return &(Q->den); } in MP_DENOM_P()
98 mp_result mp_rat_numer(mp_rat r, mp_int z);
101 mp_int mp_rat_numer_ref(mp_rat r);
104 mp_result mp_rat_denom(mp_rat r, mp_int z);
107 mp_int mp_rat_denom_ref(mp_rat r);
144 mp_result mp_rat_add_int(mp_rat a, mp_int b, mp_rat c);
147 mp_result mp_rat_sub_int(mp_rat a, mp_int b, mp_rat c);
150 mp_result mp_rat_mul_int(mp_rat a, mp_int b, mp_rat c);
154 mp_result mp_rat_div_int(mp_rat a, mp_int b, mp_rat c);
/netbsd-src/external/bsd/wpa/dist/src/tls/
H A Dbignum.c32 struct bignum *n = os_zalloc(sizeof(mp_int)); in bignum_init()
35 if (mp_init((mp_int *) n) != MP_OKAY) { in bignum_init()
50 mp_clear((mp_int *) n); in bignum_deinit()
63 return mp_unsigned_bin_size((mp_int *) n); in bignum_get_unsigned_bin_len()
77 size_t need = mp_unsigned_bin_size((mp_int *) n); in bignum_get_unsigned_bin()
82 if (mp_to_unsigned_bin((mp_int *) n, buf) != MP_OKAY) { in bignum_get_unsigned_bin()
101 if (mp_read_unsigned_bin((mp_int *) n, (u8 *) buf, len) != MP_OKAY) { in bignum_set_unsigned_bin()
117 return mp_cmp((mp_int *) a, (mp_int *) b); in bignum_cmp()
129 return mp_cmp_d((mp_int *) a, b); in bignum_cmp_d()
143 if (mp_add((mp_int *) a, (mp_int *) b, (mp_int *) c) != MP_OKAY) { in bignum_add()
[all …]
/netbsd-src/external/mit/isl/dist/
H A Disl_imath.h4 uint32_t isl_imath_hash(mp_int v, uint32_t hash);
5 int isl_imath_fits_ulong_p(mp_int op);
6 int isl_imath_fits_slong_p(mp_int op);
7 void isl_imath_addmul_ui(mp_int rop, mp_int op1, unsigned long op2);
8 void isl_imath_submul_ui(mp_int rop, mp_int op1, unsigned long op2);
9 void isl_imath_cdiv_q_ui(mp_int rop, mp_int op1, unsigned long op2);
10 void isl_imath_fdiv_q_ui(mp_int rop, mp_int op1, unsigned long op2);
H A Disl_imath.c3 uint32_t isl_imath_hash(mp_int v, uint32_t hash) in isl_imath_hash()
17 int isl_imath_fits_slong_p(mp_int op) in isl_imath_fits_slong_p()
26 int isl_imath_fits_ulong_p(mp_int op) in isl_imath_fits_ulong_p()
33 void isl_imath_addmul_ui(mp_int rop, mp_int op1, unsigned long op2) in isl_imath_addmul_ui()
45 void isl_imath_submul_ui(mp_int rop, mp_int op1, unsigned long op2) in isl_imath_submul_ui()
60 void isl_imath_cdiv_q_ui(mp_int rop, mp_int lhs, unsigned long rhs) in isl_imath_cdiv_q_ui()
74 void isl_imath_fdiv_q_ui(mp_int rop, mp_int lhs, unsigned long rhs) in isl_imath_fdiv_q_ui()
H A Disl_int_sioimath.c6 extern int isl_sioimath_decode(isl_sioimath val, int32_t *small, mp_int *big);
7 extern int isl_sioimath_decode_big(isl_sioimath val, mp_int *big);
11 extern isl_sioimath isl_sioimath_encode_big(mp_int val);
15 extern mp_int isl_sioimath_get_big(isl_sioimath val);
24 extern mp_int isl_sioimath_bigarg_src(isl_sioimath arg,
26 extern mp_int isl_sioimath_siarg_src(signed long arg,
28 extern mp_int isl_sioimath_si64arg_src(int64_t arg,
30 extern mp_int isl_sioimath_uiarg_src(unsigned long arg,
32 extern mp_int isl_sioimath_reinit_big(isl_sioimath_ptr ptr);
202 mp_int big; in isl_sioimath_print()
/netbsd-src/crypto/external/bsd/netpgp/dist/src/libbn/
H A Dbignum.c101 static int mp_mul(mp_int * a, mp_int * b, mp_int * c);
102 static int mp_sqr(mp_int * a, mp_int * b);
104 static int mp_sub_d(mp_int *a, mp_digit b, mp_int *c);
108 mp_zero(mp_int *a) in mp_zero()
125 mp_grow(mp_int *a, int size) in mp_grow()
162 mp_lshd (mp_int * a, int b) in mp_lshd()
215 mp_clamp (mp_int * a) in mp_clamp()
282 mp_mul_2d(mp_int *a, int b, mp_int *c) in mp_mul_2d()
347 mp_read_unsigned_bin(mp_int *a, const uint8_t *b, int c) in mp_read_unsigned_bin()
376 mp_count_bits(const mp_int *a) in mp_count_bits()
[all …]
/netbsd-src/crypto/external/bsd/netpgp/dist/src/netpgpverify/
H A Dbignum.c100 static int signed_multiply(mp_int * a, mp_int * b, mp_int * c);
101 static int square(mp_int * a, mp_int * b);
103 static int signed_subtract_word(mp_int *a, mp_digit b, mp_int *c);
120 mp_zero(mp_int *a) in mp_zero()
129 mp_grow(mp_int *a, int size) in mp_grow()
161 lshift_digits(mp_int * a, int b) in lshift_digits()
208 trim_unused_digits(mp_int * a) in trim_unused_digits()
256 lshift_bits(mp_int *a, int b, mp_int *c) in lshift_bits()
321 mp_read_unsigned_bin(mp_int *a, const uint8_t *b, int c) in mp_read_unsigned_bin()
350 mp_count_bits(const mp_int *a) in mp_count_bits()
[all …]
/netbsd-src/sbin/nvmectl/
H A Dbignum.c96 static int signed_multiply(mp_int * a, mp_int * b, mp_int * c);
97 static int square(mp_int * a, mp_int * b);
99 static int signed_subtract_word(mp_int *a, mp_digit b, mp_int *c);
116 mp_zero(mp_int *a) in mp_zero()
125 mp_grow(mp_int *a, int size) in mp_grow()
157 lshift_digits(mp_int * a, int b) in lshift_digits()
204 trim_unused_digits(mp_int * a) in trim_unused_digits()
252 lshift_bits(mp_int *a, int b, mp_int *c) in lshift_bits()
317 mp_read_unsigned_bin(mp_int *a, const uint8_t *b, int c) in mp_read_unsigned_bin()
346 mp_count_bits(const mp_int *a) in mp_count_bits()
[all …]
/netbsd-src/crypto/external/bsd/heimdal/dist/lib/hcrypto/
H A Drsa-ltm.c46 random_num(mp_int *num, size_t len) in random_num()
64 BN2mpz(mp_int *s, const BIGNUM *bn) in BN2mpz()
77 setup_blind(mp_int *n, mp_int *b, mp_int *bi) in setup_blind()
85 blind(mp_int *in, mp_int *b, mp_int *e, mp_int *n) in blind()
87 mp_int t1; in blind()
97 unblind(mp_int *out, mp_int *bi, mp_int *n) in unblind()
105 ltm_rsa_private_calculate(mp_int * in, mp_int * p, mp_int * q, in ltm_rsa_private_calculate()
106 mp_int * dmp1, mp_int * dmq1, mp_int * iqmp, in ltm_rsa_private_calculate()
107 mp_int * out) in ltm_rsa_private_calculate()
109 mp_int vp, vq, u; in ltm_rsa_private_calculate()
[all …]

123456