Home
last modified time | relevance | path

Searched refs:mp_err (Results 1 – 25 of 37) sorted by relevance

12

/illumos-gate/usr/src/common/crypto/ecc/
H A Decl-priv.h130 mp_err (*field_add) (const mp_int *a, const mp_int *b, mp_int *r,
132 mp_err (*field_neg) (const mp_int *a, mp_int *r, const GFMethod *meth);
133 mp_err (*field_sub) (const mp_int *a, const mp_int *b, mp_int *r,
135 mp_err (*field_mod) (const mp_int *a, mp_int *r, const GFMethod *meth);
136 mp_err (*field_mul) (const mp_int *a, const mp_int *b, mp_int *r,
138 mp_err (*field_sqr) (const mp_int *a, mp_int *r, const GFMethod *meth);
139 mp_err (*field_div) (const mp_int *a, const mp_int *b, mp_int *r,
141 mp_err (*field_enc) (const mp_int *a, mp_int *r, const GFMethod *meth);
142 mp_err (*field_dec) (const mp_int *a, mp_int *r, const GFMethod *meth);
180 mp_err (*point_add) (const mp_int *px, const mp_int *py,
[all …]
H A Decp.h51 mp_err ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py);
54 mp_err ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py);
58 mp_err ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py,
63 mp_err ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py,
68 mp_err ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
72 mp_err ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group);
78 mp_err ec_GFp_pt_mul_aff(const mp_int *n, const mp_int *px,
85 mp_err ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx,
90 mp_err ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py,
96 mp_err ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py,
[all …]
H A Dec2.h51 mp_err ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py);
54 mp_err ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py);
58 mp_err ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py,
63 mp_err ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py,
68 mp_err ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
72 mp_err ec_GF2m_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group);
79 mp_err ec_GF2m_pt_mul_aff(const mp_int *n, const mp_int *px,
87 mp_err ec_GF2m_pt_mul_mont(const mp_int *n, const mp_int *px,
94 mp_err ec_GF2m_pt_aff2proj(const mp_int *px, const mp_int *py, mp_int *rx,
99 mp_err ec_GF2m_pt_proj2aff(const mp_int *px, const mp_int *py,
[all …]
H A Decp_mont.c63 mp_err res = MP_OKAY; in GFMethod_consGFp_mont()
109 mp_err
113 mp_err res = MP_OKAY; in ec_GFp_mul_mont()
141 mp_err
148 mp_err
152 mp_err res = MP_OKAY; in ec_GFp_div_mont()
169 mp_err
173 mp_err res = MP_OKAY; in ec_GFp_enc_mont()
183 mp_err
186 mp_err res = MP_OKAY; in ec_GFp_dec_mont()
H A Decp_521.c58 mp_err
61 mp_err res = MP_OKAY; in ec_GFp_nistp521_mod()
115 mp_err
118 mp_err res = MP_OKAY; in ec_GFp_nistp521_sqr()
129 mp_err
133 mp_err res = MP_OKAY; in ec_GFp_nistp521_mul()
143 mp_err
147 mp_err res = MP_OKAY; in ec_GFp_nistp521_div()
168 mp_err
H A Decl_gf.c58 mp_err res = MP_OKAY; in GFMethod_new()
85 mp_err res = MP_OKAY; in GFMethod_consGFp()
144 mp_err res = MP_OKAY; in GFMethod_consGF2m()
214 mp_err
219 mp_err res; in ec_GFp_add()
231 mp_err
244 mp_err
248 mp_err res = MP_OKAY; in ec_GFp_sub()
269 mp_err
273 mp_err res = MP_OKAY; in ec_GFp_add_3()
[all …]
H A Decp_192.c58 mp_err
61 mp_err res = MP_OKAY; in ec_GFp_nistp192_mod()
304 mp_err
308 mp_err res = MP_OKAY; in ec_GFp_nistp192_add()
389 mp_err
393 mp_err res = MP_OKAY; in ec_GFp_nistp192_sub()
472 mp_err
475 mp_err res = MP_OKAY; in ec_GFp_nistp192_sqr()
486 mp_err
490 mp_err res = MP_OKAY; in ec_GFp_nistp192_mul()
[all …]
H A Decp_aff.c57 mp_err
70 mp_err
82 mp_err
87 mp_err res = MP_OKAY; in ec_GFp_pt_add_aff()
168 mp_err
173 mp_err res = MP_OKAY; in ec_GFp_pt_sub_aff()
189 mp_err
202 mp_err
206 mp_err res = MP_OKAY; in ec_GFp_pt_mul_aff()
295 mp_err
[all …]
H A Dec2_aff.c53 mp_err
66 mp_err
76 mp_err
81 mp_err res = MP_OKAY; in ec_GF2m_pt_add_aff()
158 mp_err
163 mp_err res = MP_OKAY; in ec_GF2m_pt_sub_aff()
178 mp_err
189 mp_err
193 mp_err res = MP_OKAY; in ec_GF2m_pt_mul_aff()
282 mp_err
[all …]
H A Dec2_163.c58 mp_err
61 mp_err res = MP_OKAY; in ec_GF2m_163_mod()
130 mp_err
133 mp_err res = MP_OKAY; in ec_GF2m_163_sqr()
179 mp_err
183 mp_err res = MP_OKAY; in ec_GF2m_163_mul()
270 mp_err
H A Dec2_193.c58 mp_err
61 mp_err res = MP_OKAY; in ec_GF2m_193_mod()
138 mp_err
141 mp_err res = MP_OKAY; in ec_GF2m_193_sqr()
188 mp_err
192 mp_err res = MP_OKAY; in ec_GF2m_193_mul()
289 mp_err
H A Decl.h79 mp_err ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px,
86 mp_err ECPoints_mul(const ECGroup *group, const mp_int *k1,
94 mp_err ECPoint_validate(const ECGroup *group, const mp_int *px, const
H A Dec2_233.c58 mp_err
61 mp_err res = MP_OKAY; in ec_GF2m_233_mod()
154 mp_err
157 mp_err res = MP_OKAY; in ec_GF2m_233_sqr()
206 mp_err
210 mp_err res = MP_OKAY; in ec_GF2m_233_mul()
314 mp_err
H A Decp_384.c56 mp_err
59 mp_err res = MP_OKAY; in ec_GFp_nistp384_mod()
264 mp_err
267 mp_err res = MP_OKAY; in ec_GFp_nistp384_sqr()
278 mp_err
282 mp_err res = MP_OKAY; in ec_GFp_nistp384_mul()
292 mp_err
H A Decp_224.c58 mp_err
61 mp_err res = MP_OKAY; in ec_GFp_nistp224_mod()
326 mp_err
329 mp_err res = MP_OKAY; in ec_GFp_nistp224_sqr()
340 mp_err
344 mp_err res = MP_OKAY; in ec_GFp_nistp224_mul()
354 mp_err
358 mp_err res = MP_OKAY; in ec_GFp_nistp224_div()
379 mp_err
H A Decp_jac.c63 mp_err
67 mp_err res = MP_OKAY; in ec_GFp_pt_aff2jac()
87 mp_err
91 mp_err res = MP_OKAY; in ec_GFp_pt_jac2aff()
128 mp_err
136 mp_err
150 mp_err
155 mp_err res = MP_OKAY; in ec_GFp_pt_add_jac_aff()
239 mp_err
243 mp_err res = MP_OKAY; in ec_GFp_pt_dbl_jac()
[all …]
/illumos-gate/usr/src/common/mpi/
H A Dmpi.h130 typedef int mp_err; typedef
252 mp_err mp_init(mp_int *mp, int kmflag);
253 mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag);
254 mp_err mp_init_copy(mp_int *mp, const mp_int *from);
255 mp_err mp_copy(const mp_int *from, mp_int *to);
260 mp_err mp_set_int(mp_int *mp, long z);
262 mp_err mp_set_ulong(mp_int *mp, unsigned long z);
265 mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b);
266 mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b);
267 mp_err mp_mul_d(const mp_int *a, mp_digit d, mp_int *b);
[all …]
H A Dmplogic.h69 mp_err mpl_not(mp_int *a, mp_int *b); /* one's complement */
70 mp_err mpl_and(mp_int *a, mp_int *b, mp_int *c); /* bitwise AND */
71 mp_err mpl_or(mp_int *a, mp_int *b, mp_int *c); /* bitwise OR */
72 mp_err mpl_xor(mp_int *a, mp_int *b, mp_int *c); /* bitwise XOR */
76 mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d); /* right shift */
77 mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d); /* left shift */
81 mp_err mpl_num_set(mp_int *a, int *num); /* count set bits */
82 mp_err mpl_num_clear(mp_int *a, int *num); /* count clear bits */
83 mp_err mpl_parity(mp_int *a); /* determine parity */
87 mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value);
[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 */
202 mp_err s_mp_lshd(mp_int *mp, mp_size p); /* left-shift by p digits */
204 mp_err s_mp_mul_2d(mp_int *mp, mp_digit d); /* multiply by 2^d in place */
208 mp_err s_mp_mul_2(mp_int *mp); /* multiply by 2 in place */
209 mp_err s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd);
211 mp_err s_mp_add_d(mp_int *mp, mp_digit d); /* unsigned digit addition */
212 mp_err s_mp_sub_d(mp_int *mp, mp_digit d); /* unsigned digit subtract */
213 mp_err s_mp_mul_d(mp_int *mp, mp_digit d); /* unsigned digit multiply */
214 mp_err s_mp_div_d(mp_int *mp, mp_digit d, mp_digit *r);
[all …]
H A Dmpprime.h58 mp_err mpp_divis(mp_int *a, mp_int *b);
59 mp_err mpp_divis_d(mp_int *a, mp_digit d);
62 mp_err mpp_random(mp_int *a);
63 mp_err mpp_random_size(mp_int *a, mp_size prec);
66 mp_err mpp_divis_vector(mp_int *a, const mp_digit *vec, int size, int *which);
67 mp_err mpp_divis_primes(mp_int *a, mp_digit *np);
68 mp_err mpp_fermat(mp_int *a, mp_digit w);
69 mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes);
70 mp_err mpp_pprime(mp_int *a, int nt);
71 mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes,
[all …]
H A Dmplogic.c83 mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d) in mpl_rsh()
85 mp_err res; in mpl_rsh()
102 mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d) in mpl_lsh()
104 mp_err res; in mpl_lsh()
124 mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value) in mpl_set_bit()
127 mp_err rv; in mpl_set_bit()
154 mp_err mpl_get_bit(const mp_int *a, mp_size bitNum) in mpl_get_bit()
157 mp_err rv; in mpl_get_bit()
165 rv = (mp_err)(MP_DIGIT(a, ix) >> bit) & 1; in mpl_get_bit()
179 mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits) in mpl_get_bits()
[all …]
H A Dmp_gf2m.h51 mp_err mp_badd(const mp_int *a, const mp_int *b, mp_int *c);
52 mp_err mp_bmul(const mp_int *a, const mp_int *b, mp_int *c);
59 mp_err mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r);
60 mp_err mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[],
62 mp_err mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r);
63 mp_err mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp,
67 mp_err mp_barr2poly(const unsigned int p[], mp_int *a);
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()
354 mp_err mp_set_int(mp_int *mp, long z) in mp_set_int()
358 mp_err res; in mp_set_int()
389 mp_err mp_set_ulong(mp_int *mp, unsigned long z) in mp_set_ulong()
392 mp_err res; in mp_set_ulong()
429 mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b) in mp_add_d()
432 mp_err res; in mp_add_d()
[all …]
H A Dmpprime.c87 mp_err mpp_random(mp_int *a) in mpp_random()
110 mp_err mpp_random_size(mp_int *a, mp_size prec) in mpp_random_size()
112 mp_err res; in mpp_random_size()
H A Dmp_gf2m.c207 mp_err
213 mp_err res = MP_OKAY; in mp_badd()
285 mp_err
291 mp_err res = MP_OKAY; in mp_bmul()
350 mp_err
357 mp_err res = MP_OKAY; in mp_bmod()
432 mp_err
435 mp_err res; in mp_bmulmod()
447 mp_err
453 mp_err res; in mp_bsqrmod()
[all …]

12