OpenCoverage

bn_exp2.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/bn/bn_exp2.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4int BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1,-
5 const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,-
6 BN_CTX *ctx, BN_MONT_CTX *in_mont)-
7{-
8 int i, j, bits, b, bits1, bits2, ret =-
9 0, wpos1, wpos2, window1, window2, wvalue1, wvalue2;-
10 int r_is_one = 1;-
11 BIGNUM *d, *r;-
12 const BIGNUM *a_mod_m;-
13-
14 BIGNUM *val1[32], *val2[32];-
15 BN_MONT_CTX *mont = -
16 ((void *)0)-
17 ;-
18-
19 ;-
20 ;-
21 ;-
22 ;-
23 ;-
24-
25 if (!(m->d[0] & 1)
!(m->d[0] & 1)Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-283
26 ERR_put_error(3,(118),(102),__FILE__,36);-
27 return
never executed: return 0;
0;
never executed: return 0;
0
28 }-
29 bits1 = BN_num_bits(p1);-
30 bits2 = BN_num_bits(p2);-
31 if ((
(bits1 == 0)Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
bits1 == 0)
(bits1 == 0)Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& (
(bits2 == 0)Description
TRUEnever evaluated
FALSEnever evaluated
bits2 == 0)
(bits2 == 0)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-283
32 ret = (BN_set_word((rr),1));-
33 return
never executed: return ret;
ret;
never executed: return ret;
0
34 }-
35-
36 bits = (
(bits1 > bits2)Description
TRUEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 195 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
bits1 > bits2)
(bits1 > bits2)Description
TRUEevaluated 88 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 195 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? bits1 : bits2;
88-195
37-
38 BN_CTX_start(ctx);-
39 d = BN_CTX_get(ctx);-
40 r = BN_CTX_get(ctx);-
41 val1[0] = BN_CTX_get(ctx);-
42 val2[0] = BN_CTX_get(ctx);-
43 if (val2[0] ==
val2[0] == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-283
44 ((void *)0)
val2[0] == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-283
45 )-
46 goto
never executed: goto err;
err;
never executed: goto err;
0
47-
48 if (in_mont !=
in_mont != ((void *)0)Description
TRUEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-283
49 ((void *)0)
in_mont != ((void *)0)Description
TRUEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-283
50 )-
51 mont = in_mont;
executed 283 times by 1 test: mont = in_mont;
Executed by:
  • libcrypto.so.1.1
283
52 else {-
53 if ((
(mont = BN_MON...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
mont = BN_MONT_CTX_new()) ==
(mont = BN_MON...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
54 ((void *)0)
(mont = BN_MON...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
55 )-
56 goto
never executed: goto err;
err;
never executed: goto err;
0
57 if (!BN_MONT_CTX_set(mont, m, ctx)
!BN_MONT_CTX_set(mont, m, ctx)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
58 goto
never executed: goto err;
err;
never executed: goto err;
0
59 }
never executed: end of block
0
60-
61 window1 = ((
(bits1) > 671Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
bits1) > 671
(bits1) > 671Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? 6 : (
(bits1) > 239Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 218 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
bits1) > 239
(bits1) > 239Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 218 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? 5 : (
(bits1) > 79Description
TRUEevaluated 218 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
bits1) > 79
(bits1) > 79Description
TRUEevaluated 218 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
? 4 : (
(bits1) > 23Description
TRUEnever evaluated
FALSEnever evaluated
bits1) > 23
(bits1) > 23Description
TRUEnever evaluated
FALSEnever evaluated
? 3 : 1);
0-283
62 window2 = ((
(bits2) > 671Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
bits2) > 671
(bits2) > 671Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? 6 : (
(bits2) > 239Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 218 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
bits2) > 239
(bits2) > 239Description
TRUEevaluated 65 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 218 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? 5 : (
(bits2) > 79Description
TRUEevaluated 213 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
bits2) > 79
(bits2) > 79Description
TRUEevaluated 213 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? 4 : (
(bits2) > 23Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
bits2) > 23
(bits2) > 23Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? 3 : 1);
0-283
63-
64-
65-
66-
67 if (a1->neg
a1->negDescription
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| BN_ucmp(a1, m) >= 0
BN_ucmp(a1, m) >= 0Description
TRUEevaluated 120 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 163 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-283
68 if (!BN_div(
!BN_div( ((voi...a1),(m),(ctx))Description
TRUEnever evaluated
FALSEevaluated 120 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-120
69 ((void *)0)
!BN_div( ((voi...a1),(m),(ctx))Description
TRUEnever evaluated
FALSEevaluated 120 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-120
70 ,(val1[0]),(a1),(m),(ctx))
!BN_div( ((voi...a1),(m),(ctx))Description
TRUEnever evaluated
FALSEevaluated 120 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-120
71 goto
never executed: goto err;
err;
never executed: goto err;
0
72 a_mod_m = val1[0];-
73 }
executed 120 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
120
74 a_mod_m = a1;
executed 163 times by 1 test: a_mod_m = a1;
Executed by:
  • libcrypto.so.1.1
163
75 if (BN_is_zero(a_mod_m)
BN_is_zero(a_mod_m)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 282 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1-282
76 (BN_set_word((rr),0));-
77 ret = 1;-
78 goto
executed 1 time by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 1 time by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
1
79 }-
80-
81 if (!BN_to_montgomery(val1[0], a_mod_m, mont, ctx)
!BN_to_montgom..._m, mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 282 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-282
82 goto
never executed: goto err;
err;
never executed: goto err;
0
83 if (window1 > 1
window1 > 1Description
TRUEevaluated 282 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-282
84 if (!BN_mod_mul_montgomery(d, val1[0], val1[0], mont, ctx)
!BN_mod_mul_mo...0], mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 282 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-282
85 goto
never executed: goto err;
err;
never executed: goto err;
0
86-
87 j = 1 << (window1 - 1);-
88 for (i = 1; i < j
i < jDescription
TRUEevaluated 2494 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 282 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
282-2494
89 if (((
((val1[i] = BN... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2494 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
val1[i] = BN_CTX_get(ctx)) ==
((val1[i] = BN... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2494 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-2494
90 ((void *)0)
((val1[i] = BN... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2494 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-2494
91 )
((val1[i] = BN... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2494 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
||
0-2494
92 !BN_mod_mul_montgomery(val1[i], val1[i - 1], d, mont, ctx)
!BN_mod_mul_mo... d, mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 2494 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2494
93 goto
never executed: goto err;
err;
never executed: goto err;
0
94 }
executed 2494 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
2494
95 }
executed 282 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
282
96-
97-
98-
99-
100 if (a2->neg
a2->negDescription
TRUEevaluated 74 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| BN_ucmp(a2, m) >= 0
BN_ucmp(a2, m) >= 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 207 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1-208
101 if (!BN_div(
!BN_div( ((voi...a2),(m),(ctx))Description
TRUEnever evaluated
FALSEevaluated 75 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-75
102 ((void *)0)
!BN_div( ((voi...a2),(m),(ctx))Description
TRUEnever evaluated
FALSEevaluated 75 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-75
103 ,(val2[0]),(a2),(m),(ctx))
!BN_div( ((voi...a2),(m),(ctx))Description
TRUEnever evaluated
FALSEevaluated 75 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-75
104 goto
never executed: goto err;
err;
never executed: goto err;
0
105 a_mod_m = val2[0];-
106 }
executed 75 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
75
107 a_mod_m = a2;
executed 207 times by 1 test: a_mod_m = a2;
Executed by:
  • libcrypto.so.1.1
207
108 if (BN_is_zero(a_mod_m)
BN_is_zero(a_mod_m)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 280 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
2-280
109 (BN_set_word((rr),0));-
110 ret = 1;-
111 goto
executed 2 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 2 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
2
112 }-
113 if (!BN_to_montgomery(val2[0], a_mod_m, mont, ctx)
!BN_to_montgom..._m, mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 280 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-280
114 goto
never executed: goto err;
err;
never executed: goto err;
0
115 if (window2 > 1
window2 > 1Description
TRUEevaluated 276 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
4-276
116 if (!BN_mod_mul_montgomery(d, val2[0], val2[0], mont, ctx)
!BN_mod_mul_mo...0], mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 276 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-276
117 goto
never executed: goto err;
err;
never executed: goto err;
0
118-
119 j = 1 << (window2 - 1);-
120 for (i = 1; i < j
i < jDescription
TRUEevaluated 2448 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 276 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i++) {
276-2448
121 if (((
((val2[i] = BN... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2448 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
val2[i] = BN_CTX_get(ctx)) ==
((val2[i] = BN... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2448 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-2448
122 ((void *)0)
((val2[i] = BN... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2448 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-2448
123 )
((val2[i] = BN... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 2448 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
||
0-2448
124 !BN_mod_mul_montgomery(val2[i], val2[i - 1], d, mont, ctx)
!BN_mod_mul_mo... d, mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 2448 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2448
125 goto
never executed: goto err;
err;
never executed: goto err;
0
126 }
executed 2448 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
2448
127 }
executed 276 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
276
128-
129-
130 r_is_one = 1;-
131 wvalue1 = 0;-
132 wvalue2 = 0;-
133 wpos1 = 0;-
134-
135 wpos2 = 0;-
136-
137-
138 if (!BN_to_montgomery(r, BN_value_one(), mont, ctx)
!BN_to_montgom...(), mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 280 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-280
139 goto
never executed: goto err;
err;
never executed: goto err;
0
140 for (b = bits - 1; b >= 0
b >= 0Description
TRUEevaluated 63046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 280 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; b--) {
280-63046
141 if (!r_is_one
!r_is_oneDescription
TRUEevaluated 62277 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 769 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
769-62277
142 if (!BN_mod_mul_montgomery(r, r, r, mont, ctx)
!BN_mod_mul_mo... r, mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 62277 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-62277
143 goto
never executed: goto err;
err;
never executed: goto err;
0
144 }
executed 62277 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
62277
145-
146 if (!wvalue1
!wvalue1Description
TRUEevaluated 35368 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 27678 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
27678-35368
147 if (BN_is_bit_set(p1, b)
BN_is_bit_set(p1, b)Description
TRUEevaluated 12021 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 23347 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
12021-23347
148-
149-
150-
151 i = b - window1 + 1;-
152 while (!BN_is_bit_set(p1, i)
!BN_is_bit_set(p1, i)Description
TRUEevaluated 11171 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12021 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
11171-12021
153 i++;
executed 11171 times by 1 test: i++;
Executed by:
  • libcrypto.so.1.1
11171
154 wpos1 = i;-
155 wvalue1 = 1;-
156 for (i = b - 1; i >= wpos1
i >= wpos1Description
TRUEevaluated 27678 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 12021 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i--) {
12021-27678
157 wvalue1 <<= 1;-
158 if (BN_is_bit_set(p1, i)
BN_is_bit_set(p1, i)Description
TRUEevaluated 19244 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 8434 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
8434-19244
159 wvalue1++;
executed 19244 times by 1 test: wvalue1++;
Executed by:
  • libcrypto.so.1.1
19244
160 }
executed 27678 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
27678
161 }
executed 12021 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
12021
162-
163 if (!wvalue2
!wvalue2Description
TRUEevaluated 35838 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 27208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
27208-35838
164 if (BN_is_bit_set(p2, b)
BN_is_bit_set(p2, b)Description
TRUEevaluated 11811 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 24027 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
11811-24027
165-
166-
167-
168 i = b - window2 + 1;-
169 while (!BN_is_bit_set(p2, i)
!BN_is_bit_set(p2, i)Description
TRUEevaluated 10992 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11811 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
10992-11811
170 i++;
executed 10992 times by 1 test: i++;
Executed by:
  • libcrypto.so.1.1
10992
171 wpos2 = i;-
172 wvalue2 = 1;-
173 for (i = b - 1; i >= wpos2
i >= wpos2Description
TRUEevaluated 27208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 11811 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i--) {
11811-27208
174 wvalue2 <<= 1;-
175 if (BN_is_bit_set(p2, i)
BN_is_bit_set(p2, i)Description
TRUEevaluated 18596 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 8612 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
8612-18596
176 wvalue2++;
executed 18596 times by 1 test: wvalue2++;
Executed by:
  • libcrypto.so.1.1
18596
177 }
executed 27208 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
27208
178 }
executed 11811 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
11811
179-
180 if (wvalue1
wvalue1Description
TRUEevaluated 39699 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 23347 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& b == wpos1
b == wpos1Description
TRUEevaluated 12021 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 27678 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
12021-39699
181-
182 if (!BN_mod_mul_montgomery(r, r, val1[wvalue1 >> 1], mont, ctx)
!BN_mod_mul_mo...1], mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 12021 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-12021
183 goto
never executed: goto err;
err;
never executed: goto err;
0
184 wvalue1 = 0;-
185 r_is_one = 0;-
186 }
executed 12021 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
12021
187-
188 if (wvalue2
wvalue2Description
TRUEevaluated 39019 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 24027 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& b == wpos2
b == wpos2Description
TRUEevaluated 11811 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 27208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
11811-39019
189-
190 if (!BN_mod_mul_montgomery(r, r, val2[wvalue2 >> 1], mont, ctx)
!BN_mod_mul_mo...1], mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 11811 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-11811
191 goto
never executed: goto err;
err;
never executed: goto err;
0
192 wvalue2 = 0;-
193 r_is_one = 0;-
194 }
executed 11811 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
11811
195 }
executed 63046 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
63046
196 if (!BN_from_montgomery(rr, r, mont, ctx)
!BN_from_montg... r, mont, ctx)Description
TRUEnever evaluated
FALSEevaluated 280 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-280
197 goto
never executed: goto err;
err;
never executed: goto err;
0
198 ret = 1;-
199 err:
code before this statement executed 280 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
280
200 if (in_mont ==
in_mont == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-283
201 ((void *)0)
in_mont == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 283 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-283
202 )-
203 BN_MONT_CTX_free(mont);
never executed: BN_MONT_CTX_free(mont);
0
204 BN_CTX_end(ctx);-
205 ;-
206 return
executed 283 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 283 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
283
207}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2