Lines Matching refs:MP_OKAY

80   "boolean true",            /* MP_OKAY, MP_YES      */
128 Initialize a new zero-valued mp_int. Returns MP_OKAY if successful,
146 precision; returns MP_OKAY if successful, or MP_MEM if memory could
163 return MP_OKAY;
174 Initialize mp as an exact copy of from. Returns MP_OKAY if
184 return MP_OKAY;
195 return MP_OKAY;
216 return MP_OKAY;
256 return MP_OKAY;
364 return MP_OKAY; /* shortcut for zero */
370 if ((res = s_mp_mul_d(mp, (UCHAR_MAX + 1))) != MP_OKAY)
374 if (res != MP_OKAY)
381 return MP_OKAY;
398 return MP_OKAY; /* shortcut for zero */
404 if ((res = s_mp_mul_d(mp, (UCHAR_MAX + 1))) != MP_OKAY)
408 if (res != MP_OKAY)
412 return MP_OKAY;
436 if((res = mp_init_copy(&tmp, a)) != MP_OKAY)
440 if((res = s_mp_add_d(&tmp, d)) != MP_OKAY)
443 if((res = s_mp_sub_d(&tmp, d)) != MP_OKAY)
480 if((res = mp_init_copy(&tmp, a)) != MP_OKAY)
484 if((res = s_mp_add_d(&tmp, d)) != MP_OKAY)
487 if((res = s_mp_sub_d(&tmp, d)) != MP_OKAY)
526 return MP_OKAY;
529 if((res = mp_copy(a, b)) != MP_OKAY)
548 if((res = mp_copy(a, c)) != MP_OKAY)
594 return MP_OKAY;
597 if((res = mp_init_copy(&qp, a)) != MP_OKAY)
632 if((res = mp_copy(a, c)) != MP_OKAY)
637 return MP_OKAY;
652 if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
654 if((res = mp_init_copy(&x, a)) != MP_OKAY)
661 if((res = s_mp_mul(&s, &x)) != MP_OKAY)
667 if((res = s_mp_sqr(&x)) != MP_OKAY)
703 if((res = mp_copy(a, b)) != MP_OKAY)
708 return MP_OKAY;
728 if((res = mp_copy(a, b)) != MP_OKAY)
736 return MP_OKAY;
791 return MP_OKAY;
798 res = MP_OKAY;
834 if ((res = mp_init_copy(&tmp, a)) != MP_OKAY)
840 if ((res = mp_init_copy(&tmp, b)) != MP_OKAY)
854 if((res = s_mp_pad(c, USED(a) + USED(b))) != MP_OKAY)
932 if((res = mp_init_copy(&tmp, a)) != MP_OKAY)
937 res = MP_OKAY;
1103 if((res = mp_copy(a, q)) != MP_OKAY)
1107 if((res = mp_copy(a, r)) != MP_OKAY)
1117 return MP_OKAY;
1144 if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
1149 if((res = mp_init_copy(&x, a)) != MP_OKAY)
1159 if((res = s_mp_mul(&s, &x)) != MP_OKAY)
1165 if((res = s_mp_sqr(&x)) != MP_OKAY)
1175 if((res = s_mp_mul(&s, &x)) != MP_OKAY)
1181 if((res = s_mp_sqr(&x)) != MP_OKAY)
1247 if((res = mp_div(a, m, NULL, c)) != MP_OKAY)
1251 if((res = mp_add(c, m, c)) != MP_OKAY)
1256 if((res = mp_copy(a, c)) != MP_OKAY)
1260 if((res = mp_add(c, m, c)) != MP_OKAY)
1270 return MP_OKAY;
1291 if((res = mp_div_d(a, d, NULL, &rem)) != MP_OKAY)
1304 return MP_OKAY;
1342 if((res = mp_init_size(&t, USED(a), FLAG(a))) != MP_OKAY)
1346 if((res = mp_init_copy(&x, a)) != MP_OKAY)
1357 if((res = mp_sqr(&t, &t)) != MP_OKAY ||
1358 (res = mp_sub(&t, a, &t)) != MP_OKAY)
1363 if((res = mp_div(&t, &x, &t, NULL)) != MP_OKAY)
1372 if((res = mp_sub(&x, &t, &x)) != MP_OKAY)
1412 if((res = mp_add(a, b, c)) != MP_OKAY)
1414 if((res = mp_mod(c, m, c)) != MP_OKAY)
1417 return MP_OKAY;
1437 if((res = mp_sub(a, b, c)) != MP_OKAY)
1439 if((res = mp_mod(c, m, c)) != MP_OKAY)
1442 return MP_OKAY;
1462 if((res = mp_mul(a, b, c)) != MP_OKAY)
1464 if((res = mp_mod(c, m, c)) != MP_OKAY)
1467 return MP_OKAY;
1482 if((res = mp_sqr(a, c)) != MP_OKAY)
1484 if((res = mp_mod(c, m, c)) != MP_OKAY)
1487 return MP_OKAY;
1519 if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
1521 if((res = mp_init_copy(&x, a)) != MP_OKAY ||
1522 (res = mp_mod(&x, m, &x)) != MP_OKAY)
1524 if((res = mp_init(&mu, FLAG(a))) != MP_OKAY)
1532 if((res = mp_div(&mu, m, &mu, NULL)) != MP_OKAY)
1542 if((res = s_mp_mul(&s, &x)) != MP_OKAY)
1544 if((res = s_mp_reduce(&s, m, &mu)) != MP_OKAY)
1550 if((res = s_mp_sqr(&x)) != MP_OKAY)
1552 if((res = s_mp_reduce(&x, m, &mu)) != MP_OKAY)
1562 if((res = s_mp_mul(&s, &x)) != MP_OKAY)
1564 if((res = s_mp_reduce(&s, m, &mu)) != MP_OKAY)
1570 if((res = s_mp_sqr(&x)) != MP_OKAY)
1572 if((res = s_mp_reduce(&x, m, &mu)) != MP_OKAY)
1600 if((res = mp_init(&s, FLAG(a))) != MP_OKAY)
1602 if((res = mp_init_copy(&x, a)) != MP_OKAY)
1609 if((res = s_mp_mul(&s, &x)) != MP_OKAY ||
1610 (res = mp_mod(&s, m, &s)) != MP_OKAY)
1616 if((res = s_mp_sqr(&x)) != MP_OKAY ||
1617 (res = mp_mod(&x, m, &x)) != MP_OKAY)
1807 if((res = mp_init(&t, FLAG(a))) != MP_OKAY)
1809 if((res = mp_init_copy(&u, a)) != MP_OKAY)
1811 if((res = mp_init_copy(&v, b)) != MP_OKAY)
1826 if((res = mp_copy(&v, &t)) != MP_OKAY)
1836 if((res = mp_copy(&u, &t)) != MP_OKAY)
1847 if((res = mp_copy(&t, &u)) != MP_OKAY)
1851 if((res = mp_copy(&t, &v)) != MP_OKAY)
1861 if((res = mp_sub(&u, &v, &t)) != MP_OKAY)
1901 if((res = mp_init(&gcd, FLAG(a))) != MP_OKAY)
1903 if((res = mp_init(&prod, FLAG(a))) != MP_OKAY)
1906 if((res = mp_mul(a, b, &prod)) != MP_OKAY)
1908 if((res = mp_gcd(a, b, &gcd)) != MP_OKAY)
2213 res = MP_OKAY;
2236 if ((res = mp_init_copy(&x, a)) != MP_OKAY)
2242 if ((res = mp_init_copy(&x, m)) != MP_OKAY)
2308 return MP_OKAY;
2515 if((res = mp_mul_d(mp, 256, mp)) != MP_OKAY)
2517 if((res = mp_add_d(mp, ustr[ix], mp)) != MP_OKAY)
2521 return MP_OKAY;
2559 return MP_OKAY;
2604 if((res = s_mp_mul_d(mp, radix)) != MP_OKAY)
2606 if((res = s_mp_add_d(mp, val)) != MP_OKAY)
2616 return MP_OKAY;
2653 if (res == MP_OKAY) {
2697 if((res = mp_init_copy(&tmp, mp)) != MP_OKAY)
2705 if((res = mp_div_d(&tmp, rdx, &tmp, &rem)) != MP_OKAY) {
2737 return MP_OKAY;
2771 if(ec < MP_LAST_CODE || ec > MP_OKAY) {
2811 return MP_OKAY;
2827 if ((res = s_mp_grow(mp, min)) != MP_OKAY)
2837 return MP_OKAY;
2971 return MP_OKAY;
2974 return MP_OKAY;
2976 if((res = s_mp_pad(mp, USED(mp) + p)) != MP_OKAY)
2989 return MP_OKAY;
3015 if (MP_OKAY != (res = s_mp_pad(mp, MP_USED(mp) + dshift + (mask != 0) )))
3018 if (dshift && MP_OKAY != (res = s_mp_lshd(mp, dshift)))
3034 return MP_OKAY;
3113 if((res = s_mp_grow(mp, ALLOC(mp) + 1)) != MP_OKAY)
3121 return MP_OKAY;
3204 mp_err res = MP_OKAY;
3254 if((res = s_mp_pad(mp, USED(mp) + 1)) != MP_OKAY)
3260 return MP_OKAY;
3264 mp_err res = MP_OKAY;
3317 return MP_OKAY;
3332 return (borrow && !used) ? MP_RANGE : MP_OKAY;
3349 return MP_OKAY;
3352 return MP_OKAY;
3397 return MP_OKAY;
3409 return MP_OKAY;
3508 if((USED(b) > USED(a)) && (res = s_mp_pad(a, USED(b))) != MP_OKAY)
3561 if((res = s_mp_pad(a, used + 1)) != MP_OKAY)
3568 if((res = s_mp_pad(a, used + 1)) != MP_OKAY)
3575 return MP_OKAY;
3601 if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a))))
3649 if((res = s_mp_pad(c, used + 1)) != MP_OKAY)
3657 if((res = s_mp_pad(c, used + 1)) != MP_OKAY)
3665 return MP_OKAY;
3684 if((lim > USED(a)) && (res = s_mp_pad(a, lim)) != MP_OKAY)
3732 if((res = s_mp_pad(a, USED(a) + 1)) != MP_OKAY)
3739 if((res = s_mp_pad(a, lim + 1)) != MP_OKAY)
3747 return MP_OKAY;
3813 return w ? MP_RANGE : MP_OKAY;
3815 return borrow ? MP_RANGE : MP_OKAY;
3836 if (MP_OKAY != (res = s_mp_pad(c, MP_USED(a))))
3886 return w ? MP_RANGE : MP_OKAY;
3888 return borrow ? MP_RANGE : MP_OKAY;
4180 return MP_OKAY;
4192 if((res = mp_init_size(&tmp, 2 * USED(a), FLAG(a))) != MP_OKAY)
4195 if (res == MP_OKAY) {
4237 return MP_OKAY;
4360 if((res = s_mp_pad(a, dig + 1)) != MP_OKAY)
4365 return MP_OKAY;
4391 if((res = mp_init_copy(&q, x)) != MP_OKAY)
4406 if((res = mp_sub(x, &q, x)) != MP_OKAY)
4412 if((res = s_mp_lshd(&q, USED(m) + 1)) != MP_OKAY)
4414 if((res = mp_add(x, &q, x)) != MP_OKAY)
4420 if((res = s_mp_sub(x, m)) != MP_OKAY)
4713 if((res = s_mp_lshd(mp, 1)) != MP_OKAY)
4718 return MP_OKAY;
4862 return MP_OKAY;