Lines Matching defs:num

17 BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num,
22 assert(num >= 0);
23 if (num <= 0)
27 while (num & ~3) {
34 num -= 4;
37 while (num) {
41 num--;
47 BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
51 assert(num >= 0);
52 if (num <= 0)
56 while (num & ~3) {
63 num -= 4;
66 while (num) {
70 num--;
103 BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num,
109 assert(num >= 0);
110 if (num <= 0)
117 while (num & ~3) {
124 num -= 4;
127 while (num) {
131 num--;
136 BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
141 assert(num >= 0);
142 if (num <= 0)
149 while (num & ~3) {
156 num -= 4;
159 while (num) {
163 num--;
858 const BN_ULONG *np, const BN_ULONG *n0p, int num)
870 return bn_sqr_mont(rp, ap, np, n0p, num);
872 vp = tp = alloca((num + 2) * sizeof(BN_ULONG));
881 for (j = 0; j < num; ++j)
884 for (j = 0; j < num; ++j)
888 tp[num] = c0;
889 tp[num + 1] = 0;
892 for (i = 0; i < num; i++) {
898 for (j = 0; j < num; ++j)
901 for (j = 0; j < num; ++j)
904 c1 = (tp[num] + c0) & BN_MASK2;
905 tp[num] = c1;
906 tp[num + 1] = (c1 < c0 ? 1 : 0);
918 for (j = 1; j < num; j++) {
927 c1 = (tp[num] + c0) & BN_MASK2;
928 tp[num - 1] = c1;
929 tp[num] = tp[num + 1] + (c1 < c0 ? 1 : 0);
932 if (tp[num] != 0 || tp[num - 1] >= np[num - 1]) {
933 c0 = bn_sub_words(rp, tp, np, num);
934 if (tp[num] != 0 || c0 == 0) {
935 for (i = 0; i < num + 2; i++)
940 for (i = 0; i < num; i++)
942 vp[num] = 0;
943 vp[num + 1] = 0;
953 const BN_ULONG *np, const BN_ULONG *n0, int num)
1001 const BN_ULONG *np, const BN_ULONG *n0p, int num)
1007 vp = tp = alloca((num + 2) * sizeof(BN_ULONG));
1009 for (i = 0; i <= num; i++)
1012 for (i = 0; i < num; i++) {
1013 c0 = bn_mul_add_words(tp, ap, num, bp[i]);
1014 c1 = (tp[num] + c0) & BN_MASK2;
1015 tp[num] = c1;
1016 tp[num + 1] = (c1 < c0 ? 1 : 0);
1018 c0 = bn_mul_add_words(tp, np, num, tp[0] * n0);
1019 c1 = (tp[num] + c0) & BN_MASK2;
1020 tp[num] = c1;
1021 tp[num + 1] += (c1 < c0 ? 1 : 0);
1022 for (j = 0; j <= num; j++)
1026 if (tp[num] != 0 || tp[num - 1] >= np[num - 1]) {
1027 c0 = bn_sub_words(rp, tp, np, num);
1028 if (tp[num] != 0 || c0 == 0) {
1029 for (i = 0; i < num + 2; i++)
1034 for (i = 0; i < num; i++)
1036 vp[num] = 0;
1037 vp[num + 1] = 0;
1042 const BN_ULONG *np, const BN_ULONG *n0, int num)