OpenCoverage

bn_sqrt.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/bn/bn_sqrt.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)-
3-
4-
5-
6-
7-
8{-
9 BIGNUM *ret = in;-
10 int err = 1;-
11 int r;-
12 BIGNUM *A, *b, *q, *t, *x, *y;-
13 int e, i, j;-
14-
15 if (!BN_is_odd(p)
!BN_is_odd(p)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4601 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| BN_abs_is_word(p, 1)
BN_abs_is_word(p, 1)Description
TRUEnever evaluated
FALSEevaluated 4601 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-4601
16 if (BN_abs_is_word(p, 2)
BN_abs_is_word(p, 2)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-5
17 if (ret ==
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5
18 ((void *)0)
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5
19 )-
20 ret = BN_new();
never executed: ret = BN_new();
0
21 if (ret ==
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5
22 ((void *)0)
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5
23 )-
24 goto
never executed: goto end;
end;
never executed: goto end;
0
25 if (!BN_set_word(ret, BN_is_bit_set(a, 0))
!BN_set_word(r...bit_set(a, 0))Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-5
26 if (ret != in
ret != inDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
27 BN_free(ret);
never executed: BN_free(ret);
0
28 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
29 ((void *)0)
never executed: return ((void *)0) ;
0
30 ;
never executed: return ((void *)0) ;
0
31 }-
32 ;-
33 return
executed 5 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 5 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
5
34 }-
35-
36 ERR_put_error(3,(121),(112),__FILE__,41);-
37 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
38 ((void *)0)
never executed: return ((void *)0) ;
0
39 ;
never executed: return ((void *)0) ;
0
40 }-
41-
42 if (BN_is_zero(a)
BN_is_zero(a)Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4594 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| BN_is_one(a)
BN_is_one(a)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4593 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1-4594
43 if (ret ==
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-8
44 ((void *)0)
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-8
45 )-
46 ret = BN_new();
never executed: ret = BN_new();
0
47 if (ret ==
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-8
48 ((void *)0)
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-8
49 )-
50 goto
never executed: goto end;
end;
never executed: goto end;
0
51 if (!BN_set_word(ret, BN_is_one(a))
!BN_set_word(r... BN_is_one(a))Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-8
52 if (ret != in
ret != inDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
53 BN_free(ret);
never executed: BN_free(ret);
0
54 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
55 ((void *)0)
never executed: return ((void *)0) ;
0
56 ;
never executed: return ((void *)0) ;
0
57 }-
58 ;-
59 return
executed 8 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 8 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
8
60 }-
61-
62 BN_CTX_start(ctx);-
63 A = BN_CTX_get(ctx);-
64 b = BN_CTX_get(ctx);-
65 q = BN_CTX_get(ctx);-
66 t = BN_CTX_get(ctx);-
67 x = BN_CTX_get(ctx);-
68 y = BN_CTX_get(ctx);-
69 if (y ==
y == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4593 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4593
70 ((void *)0)
y == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4593 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4593
71 )-
72 goto
never executed: goto end;
end;
never executed: goto end;
0
73-
74 if (ret ==
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4593 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4593
75 ((void *)0)
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4593 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4593
76 )-
77 ret = BN_new();
never executed: ret = BN_new();
0
78 if (ret ==
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4593 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4593
79 ((void *)0)
ret == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 4593 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-4593
80 )-
81 goto
never executed: goto end;
end;
never executed: goto end;
0
82-
83-
84 if (!BN_nnmod(A, a, p, ctx)
!BN_nnmod(A, a, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 4593 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-4593
85 goto
never executed: goto end;
end;
never executed: goto end;
0
86-
87-
88 e = 1;-
89 while (!BN_is_bit_set(p, e)
!BN_is_bit_set(p, e)Description
TRUEevaluated 195180 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 4593 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
4593-195180
90 e++;
executed 195180 times by 1 test: e++;
Executed by:
  • libcrypto.so.1.1
195180
91-
92-
93 if (e == 1
e == 1Description
TRUEevaluated 1894 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2699 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1894-2699
94 if (!BN_rshift(q, p, 2)
!BN_rshift(q, p, 2)Description
TRUEnever evaluated
FALSEevaluated 1894 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1894
95 goto
never executed: goto end;
end;
never executed: goto end;
0
96 q->neg = 0;-
97 if (!BN_add_word(q, 1)
!BN_add_word(q, 1)Description
TRUEnever evaluated
FALSEevaluated 1894 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1894
98 goto
never executed: goto end;
end;
never executed: goto end;
0
99 if (!BN_mod_exp(ret, A, q, p, ctx)
!BN_mod_exp(ret, A, q, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 1894 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1894
100 goto
never executed: goto end;
end;
never executed: goto end;
0
101 err = 0;-
102 goto
executed 1894 times by 1 test: goto vrfy;
Executed by:
  • libcrypto.so.1.1
vrfy;
executed 1894 times by 1 test: goto vrfy;
Executed by:
  • libcrypto.so.1.1
1894
103 }-
104-
105 if (e == 2
e == 2Description
TRUEevaluated 595 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
595-2104
106 if (!BN_mod_lshift1_quick(t, A, p)
!BN_mod_lshift1_quick(t, A, p)Description
TRUEnever evaluated
FALSEevaluated 595 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-595
107 goto
never executed: goto end;
end;
never executed: goto end;
0
108-
109-
110 if (!BN_rshift(q, p, 3)
!BN_rshift(q, p, 3)Description
TRUEnever evaluated
FALSEevaluated 595 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-595
111 goto
never executed: goto end;
end;
never executed: goto end;
0
112 q->neg = 0;-
113 if (!BN_mod_exp(b, t, q, p, ctx)
!BN_mod_exp(b, t, q, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 595 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-595
114 goto
never executed: goto end;
end;
never executed: goto end;
0
115-
116-
117 if (!BN_mod_sqr(y, b, p, ctx)
!BN_mod_sqr(y, b, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 595 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-595
118 goto
never executed: goto end;
end;
never executed: goto end;
0
119-
120-
121 if (!BN_mod_mul(t, t, y, p, ctx)
!BN_mod_mul(t, t, y, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 595 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-595
122 goto
never executed: goto end;
end;
never executed: goto end;
0
123 if (!BN_sub_word(t, 1)
!BN_sub_word(t, 1)Description
TRUEnever evaluated
FALSEevaluated 595 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-595
124 goto
never executed: goto end;
end;
never executed: goto end;
0
125-
126-
127 if (!BN_mod_mul(x, A, b, p, ctx)
!BN_mod_mul(x, A, b, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 595 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-595
128 goto
never executed: goto end;
end;
never executed: goto end;
0
129 if (!BN_mod_mul(x, x, t, p, ctx)
!BN_mod_mul(x, x, t, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 595 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-595
130 goto
never executed: goto end;
end;
never executed: goto end;
0
131-
132 if (!BN_copy(ret, x)
!BN_copy(ret, x)Description
TRUEnever evaluated
FALSEevaluated 595 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-595
133 goto
never executed: goto end;
end;
never executed: goto end;
0
134 err = 0;-
135 goto
executed 595 times by 1 test: goto vrfy;
Executed by:
  • libcrypto.so.1.1
vrfy;
executed 595 times by 1 test: goto vrfy;
Executed by:
  • libcrypto.so.1.1
595
136 }-
137-
138-
139-
140-
141-
142 if (!BN_copy(q, p)
!BN_copy(q, p)Description
TRUEnever evaluated
FALSEevaluated 2104 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2104
143 goto
never executed: goto end;
end;
never executed: goto end;
0
144 q->neg = 0;-
145 i = 2;-
146 do {-
147-
148-
149-
150-
151 if (i < 22
i < 22Description
TRUEevaluated 20474 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 550 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
550-20474
152 if (!BN_set_word(y, i)
!BN_set_word(y, i)Description
TRUEnever evaluated
FALSEevaluated 20474 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20474
153 goto
never executed: goto end;
end;
never executed: goto end;
0
154 }
executed 20474 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
20474
155 if (!BN_priv_rand(y, BN_num_bits(p), 0, 0)
!BN_priv_rand(...bits(p), 0, 0)Description
TRUEnever evaluated
FALSEevaluated 550 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-550
156 goto
never executed: goto end;
end;
never executed: goto end;
0
157 if (BN_ucmp(y, p) >= 0
BN_ucmp(y, p) >= 0Description
TRUEevaluated 123 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 427 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
123-427
158 if (!(p->neg
p->negDescription
TRUEnever evaluated
FALSEevaluated 123 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? BN_add : BN_sub) (y, y, p)
!(p->neg ? BN_...sub) (y, y, p)Description
TRUEnever evaluated
FALSEevaluated 123 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-123
159 goto
never executed: goto end;
end;
never executed: goto end;
0
160 }
executed 123 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
123
161-
162 if (BN_is_zero(y)
BN_is_zero(y)Description
TRUEnever evaluated
FALSEevaluated 550 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-550
163 if (!BN_set_word(y, i)
!BN_set_word(y, i)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
164 goto
never executed: goto end;
end;
never executed: goto end;
0
165 }
executed 550 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
550
166-
167 r = BN_kronecker(y, q, ctx);-
168 if (r < -1
r < -1Description
TRUEnever evaluated
FALSEevaluated 21024 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-21024
169 goto
never executed: goto end;
end;
never executed: goto end;
0
170 if (r == 0
r == 0Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 21019 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
5-21019
171-
172 ERR_put_error(3,(121),(112),__FILE__,199);-
173 goto
executed 5 times by 1 test: goto end;
Executed by:
  • libcrypto.so.1.1
end;
executed 5 times by 1 test: goto end;
Executed by:
  • libcrypto.so.1.1
5
174 }-
175 }
executed 21019 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
21019
176 while (r == 1
r == 1Description
TRUEevaluated 18929 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& ++
++i < 82Description
TRUEevaluated 18920 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 9 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
i < 82
++i < 82Description
TRUEevaluated 18920 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 9 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
);
9-18929
177-
178 if (r != -1
r != -1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
9-2090
179-
180-
181-
182-
183-
184 ERR_put_error(3,(121),(113),__FILE__,211);-
185 goto
executed 9 times by 1 test: goto end;
Executed by:
  • libcrypto.so.1.1
end;
executed 9 times by 1 test: goto end;
Executed by:
  • libcrypto.so.1.1
9
186 }-
187-
188-
189 if (!BN_rshift(q, q, e)
!BN_rshift(q, q, e)Description
TRUEnever evaluated
FALSEevaluated 2090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2090
190 goto
never executed: goto end;
end;
never executed: goto end;
0
191-
192-
193-
194-
195-
196 if (!BN_mod_exp(y, y, q, p, ctx)
!BN_mod_exp(y, y, q, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 2090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2090
197 goto
never executed: goto end;
end;
never executed: goto end;
0
198 if (BN_is_one(y)
BN_is_one(y)Description
TRUEnever evaluated
FALSEevaluated 2090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-2090
199 ERR_put_error(3,(121),(112),__FILE__,226);-
200 goto
never executed: goto end;
end;
never executed: goto end;
0
201 }-
202 if (!BN_rshift1(t, q)
!BN_rshift1(t, q)Description
TRUEnever evaluated
FALSEevaluated 2090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2090
203 goto
never executed: goto end;
end;
never executed: goto end;
0
204-
205-
206 if (BN_is_zero(t)
BN_is_zero(t)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2085 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
5-2085
207 if (!BN_nnmod(t, A, p, ctx)
!BN_nnmod(t, A, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-5
208 goto
never executed: goto end;
end;
never executed: goto end;
0
209 if (BN_is_zero(t)
BN_is_zero(t)Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-5
210-
211 (BN_set_word((ret),0));-
212 err = 0;-
213 goto
never executed: goto end;
end;
never executed: goto end;
0
214 } else if (!(BN_set_word((x),1))
!(BN_set_word((x),1))Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-5
215 goto
never executed: goto end;
end;
never executed: goto end;
0
216 }
executed 5 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
5
217 if (!BN_mod_exp(x, A, t, p, ctx)
!BN_mod_exp(x, A, t, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 2085 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2085
218 goto
never executed: goto end;
end;
never executed: goto end;
0
219 if (BN_is_zero(x)
BN_is_zero(x)Description
TRUEnever evaluated
FALSEevaluated 2085 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-2085
220-
221 (BN_set_word((ret),0));-
222 err = 0;-
223 goto
never executed: goto end;
end;
never executed: goto end;
0
224 }-
225 }
executed 2085 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
2085
226-
227-
228 if (!BN_mod_sqr(b, x, p, ctx)
!BN_mod_sqr(b, x, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 2090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2090
229 goto
never executed: goto end;
end;
never executed: goto end;
0
230 if (!BN_mod_mul(b, b, A, p, ctx)
!BN_mod_mul(b, b, A, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 2090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2090
231 goto
never executed: goto end;
end;
never executed: goto end;
0
232-
233-
234 if (!BN_mod_mul(x, x, A, p, ctx)
!BN_mod_mul(x, x, A, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 2090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2090
235 goto
never executed: goto end;
end;
never executed: goto end;
0
236-
237 while (1) {-
238 if (BN_is_one(b)
BN_is_one(b)Description
TRUEevaluated 1491 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 71682 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1491-71682
239 if (!BN_copy(ret, x)
!BN_copy(ret, x)Description
TRUEnever evaluated
FALSEevaluated 1491 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1491
240 goto
never executed: goto end;
end;
never executed: goto end;
0
241 err = 0;-
242 goto
executed 1491 times by 1 test: goto vrfy;
Executed by:
  • libcrypto.so.1.1
vrfy;
executed 1491 times by 1 test: goto vrfy;
Executed by:
  • libcrypto.so.1.1
1491
243 }-
244-
245-
246 i = 1;-
247 if (!BN_mod_sqr(t, b, p, ctx)
!BN_mod_sqr(t, b, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 71682 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-71682
248 goto
never executed: goto end;
end;
never executed: goto end;
0
249 while (!BN_is_one(t)
!BN_is_one(t)Description
TRUEevaluated 3365412 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 71083 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
71083-3365412
250 i++;-
251 if (i == e
i == eDescription
TRUEevaluated 599 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3364813 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
599-3364813
252 ERR_put_error(3,(121),(111),__FILE__,310);-
253 goto
executed 599 times by 1 test: goto end;
Executed by:
  • libcrypto.so.1.1
end;
executed 599 times by 1 test: goto end;
Executed by:
  • libcrypto.so.1.1
599
254 }-
255 if (!BN_mod_mul(t, t, t, p, ctx)
!BN_mod_mul(t, t, t, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 3364813 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-3364813
256 goto
never executed: goto end;
end;
never executed: goto end;
0
257 }
executed 3364813 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3364813
258-
259-
260 if (!BN_copy(t, y)
!BN_copy(t, y)Description
TRUEnever evaluated
FALSEevaluated 71083 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-71083
261 goto
never executed: goto end;
end;
never executed: goto end;
0
262 for (j = e - i - 1; j > 0
j > 0Description
TRUEevaluated 63419 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 71083 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; j--) {
63419-71083
263 if (!BN_mod_sqr(t, t, p, ctx)
!BN_mod_sqr(t, t, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 63419 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-63419
264 goto
never executed: goto end;
end;
never executed: goto end;
0
265 }
executed 63419 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
63419
266 if (!BN_mod_mul(y, t, t, p, ctx)
!BN_mod_mul(y, t, t, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 71083 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-71083
267 goto
never executed: goto end;
end;
never executed: goto end;
0
268 if (!BN_mod_mul(x, x, t, p, ctx)
!BN_mod_mul(x, x, t, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 71083 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-71083
269 goto
never executed: goto end;
end;
never executed: goto end;
0
270 if (!BN_mod_mul(b, b, y, p, ctx)
!BN_mod_mul(b, b, y, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 71083 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-71083
271 goto
never executed: goto end;
end;
never executed: goto end;
0
272 e = i;-
273 }
executed 71083 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
71083
274-
275 vrfy:
code before this statement never executed: vrfy:
0
276 if (!err
!errDescription
TRUEevaluated 3980 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-3980
277-
278-
279-
280-
281-
282 if (!BN_mod_sqr(x, ret, p, ctx)
!BN_mod_sqr(x, ret, p, ctx)Description
TRUEnever evaluated
FALSEevaluated 3980 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-3980
283 err = 1;
never executed: err = 1;
0
284-
285 if (!err
!errDescription
TRUEevaluated 3980 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& 0 != BN_cmp(x, A)
0 != BN_cmp(x, A)Description
TRUEevaluated 666 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3314 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-3980
286 ERR_put_error(3,(121),(111),__FILE__,344);-
287 err = 1;-
288 }
executed 666 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
666
289 }
executed 3980 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
3980
290-
291 end:
code before this statement executed 3980 times by 1 test: end:
Executed by:
  • libcrypto.so.1.1
3980
292 if (err
errDescription
TRUEevaluated 1279 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3314 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1279-3314
293 if (ret != in
ret != inDescription
TRUEnever evaluated
FALSEevaluated 1279 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1279
294 BN_clear_free(ret);
never executed: BN_clear_free(ret);
0
295 ret = -
296 ((void *)0)-
297 ;-
298 }
executed 1279 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1279
299 BN_CTX_end(ctx);-
300 ;-
301 return
executed 4593 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 4593 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
4593
302}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2