Home
last modified time | relevance | path

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

12

/titanic_50/usr/src/common/crypto/ecc/
H A Decp.h53 mp_err ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py);
56 mp_err ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py);
60 mp_err ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py,
61 const mp_int *qx, const mp_int *qy, mp_int *rx,
62 mp_int *ry, const ECGroup *group);
65 mp_err ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py,
66 const mp_int *qx, const mp_int *qy, mp_int *rx,
67 mp_int *ry, const ECGroup *group);
70 mp_err ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
71 mp_int *ry, const ECGroup *group);
[all …]
H A Dec2.h53 mp_err ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py);
56 mp_err ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py);
60 mp_err ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py,
61 const mp_int *qx, const mp_int *qy, mp_int *rx,
62 mp_int *ry, const ECGroup *group);
65 mp_err ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py,
66 const mp_int *qx, const mp_int *qy, mp_int *rx,
67 mp_int *ry, const ECGroup *group);
70 mp_err ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
71 mp_int *ry, const ECGroup *group);
[all …]
H A Decl-priv.h121 mp_int irr;
132 mp_err (*field_add) (const mp_int *a, const mp_int *b, mp_int *r,
134 mp_err (*field_neg) (const mp_int *a, mp_int *r, const GFMethod *meth);
135 mp_err (*field_sub) (const mp_int *a, const mp_int *b, mp_int *r,
137 mp_err (*field_mod) (const mp_int *a, mp_int *r, const GFMethod *meth);
138 mp_err (*field_mul) (const mp_int *a, const mp_int *b, mp_int *r,
140 mp_err (*field_sqr) (const mp_int *a, mp_int *r, const GFMethod *meth);
141 mp_err (*field_div) (const mp_int *a, const mp_int *b, mp_int *r,
143 mp_err (*field_enc) (const mp_int *a, mp_int *r, const GFMethod *meth);
144 mp_err (*field_dec) (const mp_int *a, mp_int *r, const GFMethod *meth);
[all …]
H A Decl.h81 mp_err ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px,
82 const mp_int *py, mp_int *qx, mp_int *qy);
88 mp_err ECPoints_mul(const ECGroup *group, const mp_int *k1,
89 const mp_int *k2, const mp_int *px, const mp_int *py,
90 mp_int *qx, mp_int *qy);
96 mp_err ECPoint_validate(const ECGroup *group, const mp_int *px, const
97 mp_int *py);
H A Dec2_aff.c56 ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py) in ec_GF2m_pt_is_inf_aff()
69 ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py) in ec_GF2m_pt_set_inf_aff()
79 ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx, in ec_GF2m_pt_add_aff()
80 const mp_int *qy, mp_int *rx, mp_int *ry, in ec_GF2m_pt_add_aff()
84 mp_int lambda, tempx, tempy; in ec_GF2m_pt_add_aff()
161 ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx, in ec_GF2m_pt_sub_aff()
162 const mp_int *qy, mp_int *rx, mp_int *ry, in ec_GF2m_pt_sub_aff()
166 mp_int nqy; in ec_GF2m_pt_sub_aff()
181 ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx, in ec_GF2m_pt_dbl_aff()
182 mp_int *ry, const ECGroup *group) in ec_GF2m_pt_dbl_aff()
[all …]
H A Decp_aff.c60 ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py) in ec_GFp_pt_is_inf_aff()
73 ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py) in ec_GFp_pt_set_inf_aff()
85 ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx, in ec_GFp_pt_add_aff()
86 const mp_int *qy, mp_int *rx, mp_int *ry, in ec_GFp_pt_add_aff()
90 mp_int lambda, temp, tempx, tempy; in ec_GFp_pt_add_aff()
171 ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx, in ec_GFp_pt_sub_aff()
172 const mp_int *qy, mp_int *rx, mp_int *ry, in ec_GFp_pt_sub_aff()
176 mp_int nqy; in ec_GFp_pt_sub_aff()
192 ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx, in ec_GFp_pt_dbl_aff()
193 mp_int *ry, const ECGroup *group) in ec_GFp_pt_dbl_aff()
[all …]
H A Decp_jac.c66 ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx, in ec_GFp_pt_aff2jac()
67 mp_int *ry, mp_int *rz, const ECGroup *group) in ec_GFp_pt_aff2jac()
90 ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py, const mp_int *pz, in ec_GFp_pt_jac2aff()
91 mp_int *rx, mp_int *ry, const ECGroup *group) in ec_GFp_pt_jac2aff()
94 mp_int z1, z2, z3; in ec_GFp_pt_jac2aff()
131 ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py, const mp_int *pz) in ec_GFp_pt_is_inf_jac()
139 ec_GFp_pt_set_inf_jac(mp_int *px, mp_int *py, mp_int *pz) in ec_GFp_pt_set_inf_jac()
153 ec_GFp_pt_add_jac_aff(const mp_int *px, const mp_int *py, const mp_int *pz, in ec_GFp_pt_add_jac_aff()
154 const mp_int *qx, const mp_int *qy, mp_int *rx, in ec_GFp_pt_add_jac_aff()
155 mp_int *ry, mp_int *rz, const ECGroup *group) in ec_GFp_pt_add_jac_aff()
[all …]
H A Decl_mult.c60 ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px, in ECPoint_mul()
61 const mp_int *py, mp_int *rx, mp_int *ry) in ECPoint_mul()
64 mp_int kt; in ECPoint_mul()
114 ec_pts_mul_basic(const mp_int *k1, const mp_int *k2, const mp_int *px, in ec_pts_mul_basic()
115 const mp_int *py, mp_int *rx, mp_int *ry, in ec_pts_mul_basic()
119 mp_int sx, sy; in ec_pts_mul_basic()
169 ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2, const mp_int *px, in ec_pts_mul_simul_w2()
170 const mp_int *py, mp_int *rx, mp_int *ry, in ec_pts_mul_simul_w2()
174 mp_int precomp[4][4][2]; in ec_pts_mul_simul_w2()
175 const mp_int *a, *b; in ec_pts_mul_simul_w2()
[all …]
H A Decp_jm.c64 ec_GFp_pt_dbl_jm(const mp_int *px, const mp_int *py, const mp_int *pz, in ec_GFp_pt_dbl_jm()
65 const mp_int *paz4, mp_int *rx, mp_int *ry, mp_int *rz, in ec_GFp_pt_dbl_jm()
66 mp_int *raz4, mp_int scratch[], const ECGroup *group) in ec_GFp_pt_dbl_jm()
69 mp_int *t0, *t1, *M, *S; in ec_GFp_pt_dbl_jm()
134 ec_GFp_pt_add_jm_aff(const mp_int *px, const mp_int *py, const mp_int *pz, in ec_GFp_pt_add_jm_aff()
135 const mp_int *paz4, const mp_int *qx, in ec_GFp_pt_add_jm_aff()
136 const mp_int *qy, mp_int *rx, mp_int *ry, mp_int *rz, in ec_GFp_pt_add_jm_aff()
137 mp_int *raz4, mp_int scratch[], const ECGroup *group) in ec_GFp_pt_add_jm_aff()
140 mp_int *A, *B, *C, *D, *C2, *C3; in ec_GFp_pt_add_jm_aff()
224 ec_GFp_pt_mul_jm_wNAF(const mp_int *n, const mp_int *px, const mp_int *py, in ec_GFp_pt_mul_jm_wNAF()
[all …]
H A Decp_mont.c63 GFMethod_consGFp_mont(const mp_int *irr) in GFMethod_consGFp_mont()
112 ec_GFp_mul_mont(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_mul_mont()
124 mp_int s; in ec_GFp_mul_mont()
144 ec_GFp_sqr_mont(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_sqr_mont()
151 ec_GFp_div_mont(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_div_mont()
172 ec_GFp_enc_mont(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_enc_mont()
186 ec_GFp_dec_mont(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_dec_mont()
H A Decl_gf.c85 GFMethod_consGFp(const mp_int *irr) in GFMethod_consGFp()
144 GFMethod_consGF2m(const mp_int *irr, const unsigned int irr_arr[5]) in GFMethod_consGF2m()
217 ec_GFp_add(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_add()
234 ec_GFp_neg(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_neg()
247 ec_GFp_sub(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_sub()
272 ec_GFp_add_3(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_add_3()
355 ec_GFp_add_4(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_add_4()
449 ec_GFp_add_5(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_add_5()
526 ec_GFp_add_6(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_add_6()
617 ec_GFp_sub_3(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_sub_3()
[all …]
H A Decp_521.c61 ec_GFp_nistp521_mod(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_nistp521_mod()
68 mp_int m1; in ec_GFp_nistp521_mod()
118 ec_GFp_nistp521_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_nistp521_sqr()
132 ec_GFp_nistp521_mul(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_nistp521_mul()
146 ec_GFp_nistp521_div(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_nistp521_div()
150 mp_int t; in ec_GFp_nistp521_div()
H A Dec2_mont.c62 gf2m_Mdouble(mp_int *x, mp_int *z, const ECGroup *group, int kmflag) in gf2m_Mdouble()
65 mp_int t1; in gf2m_Mdouble()
89 gf2m_Madd(const mp_int *x, mp_int *x1, mp_int *z1, mp_int *x2, mp_int *z2, in gf2m_Madd()
93 mp_int t1, t2; in gf2m_Madd()
121 gf2m_Mxy(const mp_int *x, const mp_int *y, mp_int *x1, mp_int *z1, in gf2m_Mxy()
122 mp_int *x2, mp_int *z2, const ECGroup *group) in gf2m_Mxy()
126 mp_int t3, t4, t5; in gf2m_Mxy()
195 ec_GF2m_pt_mul_mont(const mp_int *n, const mp_int *px, const mp_int *py, in ec_GF2m_pt_mul_mont()
196 mp_int *rx, mp_int *ry, const ECGroup *group) in ec_GF2m_pt_mul_mont()
199 mp_int x1, x2, z1, z2; in ec_GF2m_pt_mul_mont()
H A Decl.c101 ECGroup_consGFp(const mp_int *irr, const mp_int *curvea, in ECGroup_consGFp()
102 const mp_int *curveb, const mp_int *genx, in ECGroup_consGFp()
103 const mp_int *geny, const mp_int *order, int cofactor) in ECGroup_consGFp()
142 ECGroup_consGFp_mont(const mp_int *irr, const mp_int *curvea, in ECGroup_consGFp_mont()
143 const mp_int *curveb, const mp_int *genx, in ECGroup_consGFp_mont()
144 const mp_int *geny, const mp_int *order, int cofactor) in ECGroup_consGFp_mont()
186 ECGroup_consGF2m(const mp_int *irr, const unsigned int irr_arr[5], in ECGroup_consGF2m()
187 const mp_int *curvea, const mp_int *curveb, in ECGroup_consGF2m()
188 const mp_int *genx, const mp_int *geny, in ECGroup_consGF2m()
189 const mp_int *order, int cofactor) in ECGroup_consGF2m()
[all …]
H A Decp_192.c61 ec_GFp_nistp192_mod(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_nistp192_mod()
300 ec_GFp_nistp192_add(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_nistp192_add()
381 ec_GFp_nistp192_sub(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_nistp192_sub()
460 ec_GFp_nistp192_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_nistp192_sqr()
474 ec_GFp_nistp192_mul(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_nistp192_mul()
488 ec_GFp_nistp192_div(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_nistp192_div()
492 mp_int t; in ec_GFp_nistp192_div()
H A Decp_224.c61 ec_GFp_nistp224_mod(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_nistp224_mod()
320 ec_GFp_nistp224_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_nistp224_sqr()
334 ec_GFp_nistp224_mul(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_nistp224_mul()
348 ec_GFp_nistp224_div(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_nistp224_div()
352 mp_int t; in ec_GFp_nistp224_div()
H A Decp_384.c59 ec_GFp_nistp384_mod(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_nistp384_mod()
66 mp_int m[10]; in ec_GFp_nistp384_mod()
267 ec_GFp_nistp384_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_nistp384_sqr()
281 ec_GFp_nistp384_mul(const mp_int *a, const mp_int *b, mp_int *r, in ec_GFp_nistp384_mul()
/titanic_50/usr/src/common/mpi/
H A Dmpi.h246 } mp_int; typedef
253 mp_err mp_init(mp_int *mp, int kmflag);
254 mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag);
255 mp_err mp_init_copy(mp_int *mp, const mp_int *from);
256 mp_err mp_copy(const mp_int *from, mp_int *to);
257 void mp_exch(mp_int *mp1, mp_int *mp2);
258 void mp_clear(mp_int *mp);
259 void mp_zero(mp_int *mp);
260 void mp_set(mp_int *mp, mp_digit d);
261 mp_err mp_set_int(mp_int *mp, long z);
[all …]
H A Dmpi-priv.h187 mp_err s_mp_grow(mp_int *mp, mp_size min); /* increase allocated size */
188 mp_err s_mp_pad(mp_int *mp, mp_size min); /* left pad with zeroes */
191 void s_mp_clamp(mp_int *mp); /* clip leading zeroes */
200 void s_mp_exch(mp_int *a, mp_int *b); /* swap a and b in place */
202 mp_err s_mp_lshd(mp_int *mp, mp_size p); /* left-shift by p digits */
203 void s_mp_rshd(mp_int *mp, mp_size p); /* right-shift by p digits */
204 mp_err s_mp_mul_2d(mp_int *mp, mp_digit d); /* multiply by 2^d in place */
205 void s_mp_div_2d(mp_int *mp, mp_digit d); /* divide by 2^d in place */
206 void s_mp_mod_2d(mp_int *mp, mp_digit d); /* modulo 2^d in place */
207 void s_mp_div_2(mp_int *mp); /* divide by 2 in place */
[all …]
H A Dmplogic.h71 mp_err mpl_not(mp_int *a, mp_int *b); /* one's complement */
72 mp_err mpl_and(mp_int *a, mp_int *b, mp_int *c); /* bitwise AND */
73 mp_err mpl_or(mp_int *a, mp_int *b, mp_int *c); /* bitwise OR */
74 mp_err mpl_xor(mp_int *a, mp_int *b, mp_int *c); /* bitwise XOR */
78 mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d); /* right shift */
79 mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d); /* left shift */
83 mp_err mpl_num_set(mp_int *a, int *num); /* count set bits */
84 mp_err mpl_num_clear(mp_int *a, int *num); /* count clear bits */
85 mp_err mpl_parity(mp_int *a); /* determine parity */
89 mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value);
[all …]
H A Dmp_gf2m.h53 mp_err mp_badd(const mp_int *a, const mp_int *b, mp_int *c);
54 mp_err mp_bmul(const mp_int *a, const mp_int *b, mp_int *c);
61 mp_err mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r);
62 mp_err mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[],
63 mp_int *r);
64 mp_err mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r);
65 mp_err mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp,
66 const unsigned int p[], mp_int *r);
68 int mp_bpoly2arr(const mp_int *a, unsigned int p[], int max);
69 mp_err mp_barr2poly(const unsigned int p[], mp_int *a);
H A Dmpprime.h60 mp_err mpp_divis(mp_int *a, mp_int *b);
61 mp_err mpp_divis_d(mp_int *a, mp_digit d);
64 mp_err mpp_random(mp_int *a);
65 mp_err mpp_random_size(mp_int *a, mp_size prec);
68 mp_err mpp_divis_vector(mp_int *a, const mp_digit *vec, int size, int *which);
69 mp_err mpp_divis_primes(mp_int *a, mp_digit *np);
70 mp_err mpp_fermat(mp_int *a, mp_digit w);
71 mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes);
72 mp_err mpp_pprime(mp_int *a, int nt);
73 mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes,
[all …]
H A Dmpi.c132 mp_err mp_init(mp_int *mp, int kmflag) in mp_init()
150 mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag) in mp_init_size()
179 mp_err mp_init_copy(mp_int *mp, const mp_int *from) in mp_init_copy()
211 mp_err mp_copy(const mp_int *from, mp_int *to) in mp_copy()
272 void mp_exch(mp_int *mp1, mp_int *mp2) in mp_exch()
297 void mp_clear(mp_int *mp) in mp_clear()
325 void mp_zero(mp_int *mp) in mp_zero()
340 void mp_set(mp_int *mp, mp_digit d) in mp_set()
354 mp_err mp_set_int(mp_int *mp, long z) in mp_set_int()
389 mp_err mp_set_ulong(mp_int *mp, unsigned long z) in mp_set_ulong()
[all …]
H A Dmplogic.c85 mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d) in mpl_rsh()
104 mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d) in mpl_lsh()
126 mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value) in mpl_set_bit()
156 mp_err mpl_get_bit(const mp_int *a, mp_size bitNum) in mpl_get_bit()
181 mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits) in mpl_get_bits()
205 mp_err mpl_significant_bits(const mp_int *a) in mpl_significant_bits()
H A Dmp_gf2m.c210 mp_badd(const mp_int *a, const mp_int *b, mp_int *c) in mp_badd()
288 mp_bmul(const mp_int *a, const mp_int *b, mp_int *c) in mp_bmul()
291 mp_int tmp; in mp_bmul()
310 const mp_int *xch = b; /* switch a and b if b longer */ in mp_bmul()
353 mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r) in mp_bmod()
435 mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[], mp_int *r) in mp_bmulmod()
450 mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r) in mp_bsqrmod()
453 mp_int tmp; in mp_bsqrmod()
495 mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp, in mp_bdivmod()
496 const unsigned int p[], mp_int *r) in mp_bdivmod()
[all …]

12