OpenCoverage

f_impl.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/ec/curve448/arch_32/f_impl.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2void gf_mul(gf_s * __restrict__ cs, const gf as, const gf bs)-
3{-
4 const uint32_t *a = as->limb, *b = bs->limb;-
5 uint32_t *c = cs->limb;-
6 uint64_t accum0 = 0, accum1 = 0, accum2 = 0;-
7 uint32_t mask = (1 << 28) - 1;-
8 uint32_t aa[8], bb[8];-
9 int i, j;-
10-
11 for (i = 0; i < 8
i < 8Description
TRUEevaluated 38013344 times by 2 tests
Evaluated by:
  • curve448_internal_test
  • libcrypto.so.1.1
FALSEevaluated 4751668 times by 2 tests
Evaluated by:
  • curve448_internal_test
  • libcrypto.so.1.1
; i++) {
4751668-38013344
12 aa[i] = a[i] + a[i + 8];-
13 bb[i] = b[i] + b[i + 8];-
14 }
executed 38013344 times by 2 tests: end of block
Executed by:
  • curve448_internal_test
  • libcrypto.so.1.1
38013344
15-
16 for (j = 0; j < 8
j < 8Description
TRUEevaluated 38013344 times by 2 tests
Evaluated by:
  • curve448_internal_test
  • libcrypto.so.1.1
FALSEevaluated 4751668 times by 2 tests
Evaluated by:
  • curve448_internal_test
  • libcrypto.so.1.1
; j++) {
4751668-38013344
17 accum2 = 0;-
18 for (i = 0; i < j + 1
i < j + 1Description
TRUEevaluated 171060048 times by 2 tests
Evaluated by:
  • curve448_internal_test
  • libcrypto.so.1.1
FALSEevaluated 38013344 times by 2 tests
Evaluated by:
  • curve448_internal_test
  • libcrypto.so.1.1
; i++) {
38013344-171060048
19 accum2 += widemul(a[j - i], b[i]);-
20 accum1 += widemul(aa[j - i], bb[i]);-
21 accum0 += widemul(a[8 + j - i], b[8 + i]);-
22 }
executed 171060048 times by 2 tests: end of block
Executed by:
  • curve448_internal_test
  • libcrypto.so.1.1
171060048
23 accum1 -= accum2;-
24 accum0 += accum2;-
25 accum2 = 0;-
26 for (i = j + 1; i < 8
i < 8Description
TRUEevaluated 133046704 times by 2 tests
Evaluated by:
  • curve448_internal_test
  • libcrypto.so.1.1
FALSEevaluated 38013344 times by 2 tests
Evaluated by:
  • curve448_internal_test
  • libcrypto.so.1.1
; i++) {
38013344-133046704
27 accum0 -= widemul(a[8 + j - i], b[i]);-
28 accum2 += widemul(aa[8 + j - i], bb[i]);-
29 accum1 += widemul(a[16 + j - i], b[8 + i]);-
30 }
executed 133046704 times by 2 tests: end of block
Executed by:
  • curve448_internal_test
  • libcrypto.so.1.1
133046704
31 accum1 += accum2;-
32 accum0 += accum2;-
33 c[j] = ((uint32_t)(accum0)) & mask;-
34 c[j + 8] = ((uint32_t)(accum1)) & mask;-
35 accum0 >>= 28;-
36 accum1 >>= 28;-
37 }
executed 38013344 times by 2 tests: end of block
Executed by:
  • curve448_internal_test
  • libcrypto.so.1.1
38013344
38-
39 accum0 += accum1;-
40 accum0 += c[8];-
41 accum1 += c[0];-
42 c[8] = ((uint32_t)(accum0)) & mask;-
43 c[0] = ((uint32_t)(accum1)) & mask;-
44-
45 accum0 >>= 28;-
46 accum1 >>= 28;-
47 c[9] += ((uint32_t)(accum0));-
48 c[1] += ((uint32_t)(accum1));-
49}
executed 4751668 times by 2 tests: end of block
Executed by:
  • curve448_internal_test
  • libcrypto.so.1.1
4751668
50-
51void gf_mulw_unsigned(gf_s * __restrict__ cs, const gf as, uint32_t b)-
52{-
53 const uint32_t *a = as->limb;-
54 uint32_t *c = cs->limb;-
55 uint64_t accum0 = 0, accum8 = 0;-
56 uint32_t mask = (1 << 28) - 1;-
57 int i;-
58-
59 -
60 ((void) (0))-
61 ;-
62-
63 for (i = 0; i < 8
i < 8Description
TRUEevaluated 3634968 times by 2 tests
Evaluated by:
  • curve448_internal_test
  • libcrypto.so.1.1
FALSEevaluated 454371 times by 2 tests
Evaluated by:
  • curve448_internal_test
  • libcrypto.so.1.1
; i++) {
454371-3634968
64 accum0 += widemul(b, a[i]);-
65 accum8 += widemul(b, a[i + 8]);-
66 c[i] = accum0 & mask;-
67 accum0 >>= 28;-
68 c[i + 8] = accum8 & mask;-
69 accum8 >>= 28;-
70 }
executed 3634968 times by 2 tests: end of block
Executed by:
  • curve448_internal_test
  • libcrypto.so.1.1
3634968
71-
72 accum0 += accum8 + c[8];-
73 c[8] = ((uint32_t)accum0) & mask;-
74 c[9] += (uint32_t)(accum0 >> 28);-
75-
76 accum8 += c[0];-
77 c[0] = ((uint32_t)accum8) & mask;-
78 c[1] += (uint32_t)(accum8 >> 28);-
79}
executed 454371 times by 2 tests: end of block
Executed by:
  • curve448_internal_test
  • libcrypto.so.1.1
454371
80-
81void gf_sqr(gf_s * __restrict__ cs, const gf as)-
82{-
83 gf_mul(cs, as, as);-
84}
executed 2358815 times by 2 tests: end of block
Executed by:
  • curve448_internal_test
  • libcrypto.so.1.1
2358815
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2