randombit / botan

@@ -7,7 +7,6 @@
Loading
7 7
8 8
#include <botan/internal/curve_nistp.h>
9 9
#include <botan/internal/mp_core.h>
10 -
#include <botan/internal/mp_asmi.h>
11 10
#include <botan/internal/ct_utils.h>
12 11
13 12
namespace Botan {

@@ -11,7 +11,6 @@
Loading
11 11
#include <botan/numthry.h>
12 12
#include <botan/reducer.h>
13 13
#include <botan/internal/mp_core.h>
14 -
#include <botan/internal/mp_asmi.h>
15 14
#include <botan/internal/monty.h>
16 15
17 16
namespace Botan {

@@ -1,13 +1,11 @@
Loading
1 1
/*
2 -
* This file was automatically generated by ./src/scripts/monty.py on 2018-06-11
2 +
* This file was automatically generated by ./src/scripts/monty.py on 2021-05-01
3 3
* All manual changes will be lost. Edit the script instead.
4 4
*
5 5
* Botan is released under the Simplified BSD License (see license.txt)
6 6
*/
7 7
8 -
#include <botan/internal/mp_monty.h>
9 8
#include <botan/internal/mp_core.h>
10 -
#include <botan/internal/mp_asmi.h>
11 9
#include <botan/internal/ct_utils.h>
12 10
13 11
namespace Botan {
@@ -58,12 +56,7 @@
Loading
58 56
   word3_add(&w2, &w1, &w0, z[9]);
59 57
   ws[4] = w0;
60 58
   ws[5] = w1;
61 -
   word borrow = 0;
62 -
   ws[5] = word_sub(ws[0], p[0], &borrow);
63 -
   ws[6] = word_sub(ws[1], p[1], &borrow);
64 -
   ws[7] = word_sub(ws[2], p[2], &borrow);
65 -
   ws[8] = word_sub(ws[3], p[3], &borrow);
66 -
   ws[9] = word_sub(ws[4], 0, &borrow);
59 +
   word borrow = bigint_sub3(ws + 4 + 1, ws, 4 + 1, p, 4);
67 60
   CT::conditional_copy_mem(borrow, z, ws, ws + 5, 5);
68 61
   clear_mem(z + 4, 2*(4+1) - 4);
69 62
   }
@@ -146,14 +139,7 @@
Loading
146 139
   word3_add(&w2, &w1, &w0, z[13]);
147 140
   ws[6] = w0;
148 141
   ws[7] = w1;
149 -
   word borrow = 0;
150 -
   ws[7] = word_sub(ws[0], p[0], &borrow);
151 -
   ws[8] = word_sub(ws[1], p[1], &borrow);
152 -
   ws[9] = word_sub(ws[2], p[2], &borrow);
153 -
   ws[10] = word_sub(ws[3], p[3], &borrow);
154 -
   ws[11] = word_sub(ws[4], p[4], &borrow);
155 -
   ws[12] = word_sub(ws[5], p[5], &borrow);
156 -
   ws[13] = word_sub(ws[6], 0, &borrow);
142 +
   word borrow = bigint_sub3(ws + 6 + 1, ws, 6 + 1, p, 6);
157 143
   CT::conditional_copy_mem(borrow, z, ws, ws + 7, 7);
158 144
   clear_mem(z + 6, 2*(6+1) - 6);
159 145
   }
@@ -276,16 +262,7 @@
Loading
276 262
   word3_add(&w2, &w1, &w0, z[17]);
277 263
   ws[8] = w0;
278 264
   ws[9] = w1;
279 -
   word borrow = 0;
280 -
   ws[9] = word_sub(ws[0], p[0], &borrow);
281 -
   ws[10] = word_sub(ws[1], p[1], &borrow);
282 -
   ws[11] = word_sub(ws[2], p[2], &borrow);
283 -
   ws[12] = word_sub(ws[3], p[3], &borrow);
284 -
   ws[13] = word_sub(ws[4], p[4], &borrow);
285 -
   ws[14] = word_sub(ws[5], p[5], &borrow);
286 -
   ws[15] = word_sub(ws[6], p[6], &borrow);
287 -
   ws[16] = word_sub(ws[7], p[7], &borrow);
288 -
   ws[17] = word_sub(ws[8], 0, &borrow);
265 +
   word borrow = bigint_sub3(ws + 8 + 1, ws, 8 + 1, p, 8);
289 266
   CT::conditional_copy_mem(borrow, z, ws, ws + 9, 9);
290 267
   clear_mem(z + 8, 2*(8+1) - 8);
291 268
   }

@@ -1,13 +1,12 @@
Loading
1 1
/*
2 2
* Comba Multiplication and Squaring
3 3
*
4 -
* This file was automatically generated by ./src/scripts/comba.py on 2018-05-08
4 +
* This file was automatically generated by ./src/scripts/comba.py on 2021-05-01
5 5
*
6 6
* Botan is released under the Simplified BSD License (see license.txt)
7 7
*/
8 8
9 9
#include <botan/internal/mp_core.h>
10 -
#include <botan/internal/mp_asmi.h>
11 10
12 11
namespace Botan {
13 12

@@ -8,17 +8,12 @@
Loading
8 8
*/
9 9
10 10
#include <botan/internal/mp_core.h>
11 -
#include <botan/internal/mp_monty.h>
12 -
#include <botan/internal/mp_madd.h>
13 -
#include <botan/internal/mp_asmi.h>
14 11
#include <botan/internal/ct_utils.h>
15 12
#include <botan/mem_ops.h>
16 13
#include <botan/exceptn.h>
17 14
18 15
namespace Botan {
19 16
20 -
namespace {
21 -
22 17
/*
23 18
* Montgomery reduction - product scanning form
24 19
*
@@ -92,11 +87,7 @@
Loading
92 87
   * borrow.
93 88
   */
94 89
95 -
   // word borrow = bigint_sub3(ws + p_size + 1, ws, p_size + 1, p, p_size);
96 -
   word borrow = 0;
97 -
   for(size_t i = 0; i != p_size; ++i)
98 -
      ws[p_size + 1 + i] = word_sub(ws[i], p[i], &borrow);
99 -
   ws[2*p_size+1] = word_sub(ws[p_size], 0, &borrow);
90 +
   word borrow = bigint_sub3(ws + p_size + 1, ws, p_size + 1, p, p_size);
100 91
101 92
   BOTAN_DEBUG_ASSERT(borrow == 0 || borrow == 1);
102 93
@@ -105,29 +96,3 @@
Loading
105 96
   }
106 97
107 98
}
108 -
109 -
void bigint_monty_redc(word z[],
110 -
                       const word p[], size_t p_size, word p_dash,
111 -
                       word ws[], size_t ws_size)
112 -
   {
113 -
   const size_t z_size = 2*(p_size+1);
114 -
115 -
   BOTAN_ARG_CHECK(ws_size >= z_size, "workspace too small");
116 -
117 -
   if(p_size == 4)
118 -
      bigint_monty_redc_4(z, p, p_dash, ws);
119 -
   else if(p_size == 6)
120 -
      bigint_monty_redc_6(z, p, p_dash, ws);
121 -
   else if(p_size == 8)
122 -
      bigint_monty_redc_8(z, p, p_dash, ws);
123 -
   else if(p_size == 16)
124 -
      bigint_monty_redc_16(z, p, p_dash, ws);
125 -
   else if(p_size == 24)
126 -
      bigint_monty_redc_24(z, p, p_dash, ws);
127 -
   else if(p_size == 32)
128 -
      bigint_monty_redc_32(z, p, p_dash, ws);
129 -
   else
130 -
      bigint_monty_redc_generic(z, z_size, p, p_size, p_dash, ws);
131 -
   }
132 -
133 -
}

@@ -7,7 +7,6 @@
Loading
7 7
8 8
#include <botan/internal/divide.h>
9 9
#include <botan/internal/mp_core.h>
10 -
#include <botan/internal/mp_madd.h>
11 10
#include <botan/internal/ct_utils.h>
12 11
#include <botan/internal/bit_ops.h>
13 12

@@ -7,7 +7,6 @@
Loading
7 7
*/
8 8
9 9
#include <botan/internal/mp_core.h>
10 -
#include <botan/internal/mp_asmi.h>
11 10
#include <botan/internal/ct_utils.h>
12 11
#include <botan/mem_ops.h>
13 12
#include <botan/exceptn.h>
Files Coverage
src 92.32%
Project Totals (567 files) 92.32%
1
---
2

3
# Documentation
4
# https://github.com/codecov/support/wiki/Codecov-Yaml#full-yaml
5
#
6
# Validate this file
7
# curl --data-binary @codecov.yml https://codecov.io/validate
8

9
coverage:
10
  status:
11
    project:
12
      default:
13
        # Random seeds in tests lead to a +/-0.05% coverage span even for PRs
14
        # that do not change source code
15
        threshold: 0.05
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading