Commit c7686f2467a1926db13f9c6ce5480942c8ccd4a4

Steffen Jaeckel 2022-10-02T12:58:53

slightly edit, update and run typos.sh Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 525ba1c..8f85249 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,7 +61,7 @@ endif()
 # What compiler do we have and what are their...uhm... peculiarities
 if(CMAKE_C_COMPILER_ID MATCHES "(C|c?)lang")
     list(APPEND LTM_C_FLAGS -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header)
-    # Clang requires at least '-O1' for dead code eliminiation
+    # Clang requires at least '-O1' for dead code elimination
     set(CMAKE_C_FLAGS_DEBUG "-O1 ${CMAKE_C_FLAGS_DEBUG}")
 endif()
 if(CMAKE_C_COMPILER MATCHES "mingw")
diff --git a/astylerc b/astylerc
index c5ff779..029f358 100644
--- a/astylerc
+++ b/astylerc
@@ -4,7 +4,7 @@
 # usage:
 #       astyle --options=astylerc *.[ch]
 
-# Do not create backup, annonying in the times of git
+# Do not create backup, annoying in the times of git
 suffix=none
 
 ## Bracket Style Options
diff --git a/changes.txt b/changes.txt
index 1b3a7a3..565500b 100644
--- a/changes.txt
+++ b/changes.txt
@@ -19,7 +19,7 @@ v1.2.0
        -- Unified, safer and improved API's
        -- Less magic numbers - return values (where appropriate) and most flags are now enums,
           this was implemented in a backwards compatible way where return values were int.
-       -- API's with return values are now by default marked as "warn on unsused result", this
+       -- API's with return values are now by default marked as "warn on unused result", this
           can be disabled if required (which will most likely hide bugs), c.f. MP_WUR in tommath.h
        -- Provide a whole set of setters&getters for different primitive types (long, uint32_t, etc.)
        -- All those primitive setters are now optimized.
@@ -412,8 +412,8 @@ v0.13  -- tons of minor speed-ups in low level add, sub, mul_2 and div_2 which p
 Jan 17th, 2003
 v0.12  -- re-wrote the majority of the makefile so its more portable and will
           install via "make install" on most *nix platforms
-       -- Re-packaged all the source as seperate files.  Means the library a single
-          file packagage any more.  Instead of just adding "bn.c" you have to add
+       -- Re-packaged all the source as separate files.  Means the library a single
+          file package any more.  Instead of just adding "bn.c" you have to add
           libtommath.a
        -- Renamed "bn.h" to "tommath.h"
        -- Changes to the manual to reflect all of this
@@ -444,7 +444,7 @@ v0.08  -- Sped up the multipliers by moving the inner loop variables into a smal
        -- add etc/pprime.c program which makes numbers which are provably prime.
 
 Jan 1st, 2003
-v0.07  -- Removed alot of heap operations from core functions to speed them up
+v0.07  -- Removed a lot of heap operations from core functions to speed them up
        -- Added a root finding function [and mp_sqrt macro like from MPI]
        -- Added more to manual
 
diff --git a/demo/mtest_opponent.c b/demo/mtest_opponent.c
index 25d9b5b..abd7c16 100644
--- a/demo/mtest_opponent.c
+++ b/demo/mtest_opponent.c
@@ -82,7 +82,7 @@ static int mtest_opponent(void)
 #endif
 
    for (;;) {
-      /* randomly clear and re-init one variable, this has the affect of triming the alloc space */
+      /* randomly clear and re-init one variable, this has the effect of trimming the alloc space */
       switch (abs(rand()) % 7) {
       case 0:
          mp_clear(&a);
diff --git a/demo/test.c b/demo/test.c
index c87f97c..16fef55 100644
--- a/demo/test.c
+++ b/demo/test.c
@@ -1548,7 +1548,7 @@ LBL_ERR:
    default(realprecision,1000);
    for(n=3,100,r = floor(a^(1/n));printf("\"" r "\", "))
 
-   All numbers as strings to simplifiy things, especially for the
+   All numbers as strings to simplify things, especially for the
    low-mp branch.
 */
 
@@ -2166,7 +2166,7 @@ static int test_mp_pack_unpack(void)
    uint8_t *buf = NULL;
 
    mp_order order = MP_LSB_FIRST;
-   mp_endian endianess = MP_NATIVE_ENDIAN;
+   mp_endian endianness = MP_NATIVE_ENDIAN;
 
    DOR(mp_init_multi(&a, &b, NULL));
    DO(mp_rand(&a, 15));
@@ -2180,9 +2180,9 @@ static int test_mp_pack_unpack(void)
    }
 
    DO(mp_pack((void *)buf, count, &written, order, 1uL,
-              endianess, 0uL, &a));
+              endianness, 0uL, &a));
    DO(mp_unpack(&b, count, order, 1uL,
-                endianess, 0uL, (const void *)buf));
+                endianness, 0uL, (const void *)buf));
 
    if (mp_cmp(&a, &b) != MP_EQ) {
       fprintf(stderr, "pack/unpack cycle failed\n");
diff --git a/doc/bn.tex b/doc/bn.tex
index 3e01e32..566b3be 100644
--- a/doc/bn.tex
+++ b/doc/bn.tex
@@ -210,7 +210,7 @@ $ sudo pkg_add gmake libtool
 At this time two versions of \texttt{libtool} are installed and both are named \texttt{libtool},
 unfortunately but GNU \texttt{libtool} has been placed in \texttt{/usr/local/bin/} and the native
 version in \texttt{/usr/bin/}. The path might be different in other versions of OpenBSD but both
-programms differ in the output of \texttt{libtool --version}
+programs differ in the output of \texttt{libtool --version}
 \begin{alltt}
 $ /usr/local/bin/libtool --version
 libtool (GNU libtool) 2.4.2
@@ -519,7 +519,7 @@ mp_err mp_init (mp_int *a);
 \end{alltt}
 
 This function expects a pointer to an \texttt{mp\_int} structure and will initialize the members
-ofthe structure so the \texttt{mp\_int} represents the default integer which is zero.  If the
+of the structure so the \texttt{mp\_int} represents the default integer which is zero.  If the
 functions returns \texttt{MP\_OKAY} then the \texttt{mp\_int} is ready to be used by the other
 LibTomMath functions.
 
@@ -2213,7 +2213,7 @@ is actually a composite. There is a deterministic test for numbers smaller than 
 Determining the probability needed to pick the right column is a bit harder. Fips 186.4, for
 example has $2^{-80}$ for $512$ bit large numbers, $2^{-112}$ for $1024$ bits, and $2^{128}$ for
 $1536$ bits. It can be seen in table \ref{table:millerrabinrunsp1} that those combinations follow
-the diagonal from $(512,2^{-80})$ downwards and to the right to gain a lower probabilty of getting
+the diagonal from $(512,2^{-80})$ downwards and to the right to gain a lower probability of getting
 a composite declared a pseudoprime for the same amount of work or less.
 
 If this version of the library has the strong Lucas--Selfridge and/or the Frobenius--Underwood test
diff --git a/doc/makefile b/doc/makefile
index 84c48e4..a8c6a65 100644
--- a/doc/makefile
+++ b/doc/makefile
@@ -40,7 +40,7 @@ manual:	mandvi
 
 # The file latexindent.pl is in several LaTeX distributions, if not:
 # https://ctan.org/pkg/latexindent
-# Its configuraion is well documented
+# Its configuration is well documented
 # http://mirrors.ctan.org/support/latexindent/documentation/latexindent.pdf
 pretty:
 	latexindent -s -w -m -l=.latexindent.yaml bn.tex
diff --git a/logs/before_after.dem b/logs/before_after.dem
index edb59da..33721ad 100644
--- a/logs/before_after.dem
+++ b/logs/before_after.dem
@@ -23,8 +23,8 @@ plot 'sqr-before.log' smooth bezier title "Squaring (without Karatsuba) (before)
 set output "expt-ba.png"
 plot 'expt-before.log' smooth bezier title "Exptmod (Montgomery) (before)", \
       'expt-after.log' smooth bezier title "Exptmod (Montgomery) (after)", \
-      'expt_dr-before.log' smooth bezier title "Exptmod (Dimminished Radix) (before)", \
-      'expt_dr-after.log' smooth bezier title "Exptmod (Dimminished Radix) (after)", \
+      'expt_dr-before.log' smooth bezier title "Exptmod (Diminished Radix) (before)", \
+      'expt_dr-after.log' smooth bezier title "Exptmod (Diminished Radix) (after)", \
       'expt_2k-before.log' smooth bezier title "Exptmod (2k Reduction) (before)", \
       'expt_2k-after.log' smooth bezier title "Exptmod (2k Reduction) (after)", \
       'expt_2kl-before.log' smooth bezier title "Exptmod (2k-l Reduction) (before)", \
diff --git a/logs/graphs.dem b/logs/graphs.dem
index 538e5c0..fc8ef1b 100644
--- a/logs/graphs.dem
+++ b/logs/graphs.dem
@@ -9,7 +9,7 @@ set output "mult.png"
 plot 'sqr.log' smooth bezier title "Squaring (without Karatsuba)", 'sqr_kara.log' smooth bezier title "Squaring (Karatsuba)", 'mult.log' smooth bezier title "Multiplication (without Karatsuba)", 'mult_kara.log' smooth bezier title "Multiplication (Karatsuba)"
 
 set output "expt.png"
-plot 'expt.log' smooth bezier title "Exptmod (Montgomery)", 'expt_dr.log' smooth bezier title "Exptmod (Dimminished Radix)", 'expt_2k.log' smooth bezier title "Exptmod (2k Reduction)"
+plot 'expt.log' smooth bezier title "Exptmod (Montgomery)", 'expt_dr.log' smooth bezier title "Exptmod (Diminished Radix)", 'expt_2k.log' smooth bezier title "Exptmod (2k Reduction)"
 
 set output "invmod.png"
 plot 'invmod.log' smooth bezier title "Modular Inverse"
diff --git a/makefile b/makefile
index 7fe933f..6662743 100644
--- a/makefile
+++ b/makefile
@@ -130,7 +130,7 @@ zipup: clean astyle new_file docs
 	@#   As the pdf creation modifies the tex files, git sometimes detects the
 	@#   modified files, but misses that it's put back to its original version.
 	@git update-index --refresh
-	@git diff-index --quiet HEAD -- || ( echo "FAILURE: uncommited changes or not a git" && exit 1 )
+	@git diff-index --quiet HEAD -- || ( echo "FAILURE: uncommitted changes or not a git" && exit 1 )
 	rm -rf libtommath-$(VERSION) ltm-$(VERSION).*
 	@# files/dirs excluded from "git archive" are defined in .gitattributes
 	git archive --format=tar --prefix=libtommath-$(VERSION)/ HEAD | tar x
diff --git a/mp_2expt.c b/mp_2expt.c
index 66e8574..4a5fc00 100644
--- a/mp_2expt.c
+++ b/mp_2expt.c
@@ -15,7 +15,7 @@ mp_err mp_2expt(mp_int *a, int b)
    /* zero a as per default */
    mp_zero(a);
 
-   /* grow a to accomodate the single bit */
+   /* grow a to accommodate the single bit */
    if ((err = mp_grow(a, (b / MP_DIGIT_BIT) + 1)) != MP_OKAY) {
       return err;
    }
diff --git a/mp_clamp.c b/mp_clamp.c
index ae59c40..463f22d 100644
--- a/mp_clamp.c
+++ b/mp_clamp.c
@@ -6,7 +6,7 @@
 /* trim unused digits
  *
  * This is used to ensure that leading zero digits are
- * trimed and the leading "used" digit will be non-zero
+ * trimmed and the leading "used" digit will be non-zero
  * Typically very fast.  Also fixes the sign if there
  * are no more leading digits
  */
diff --git a/mp_cmp_mag.c b/mp_cmp_mag.c
index e5e502b..06f22e7 100644
--- a/mp_cmp_mag.c
+++ b/mp_cmp_mag.c
@@ -3,7 +3,7 @@
 /* LibTomMath, multiple-precision integer library -- Tom St Denis */
 /* SPDX-License-Identifier: Unlicense */
 
-/* compare maginitude of two ints (unsigned) */
+/* compare magnitude of two ints (unsigned) */
 mp_ord mp_cmp_mag(const mp_int *a, const mp_int *b)
 {
    int n;
diff --git a/mp_exptmod.c b/mp_exptmod.c
index b8a5dcc..eaab861 100644
--- a/mp_exptmod.c
+++ b/mp_exptmod.c
@@ -5,7 +5,7 @@
 
 /* this is a shell function that calls either the normal or Montgomery
  * exptmod functions.  Originally the call to the montgomery code was
- * embedded in the normal function but that wasted alot of stack space
+ * embedded in the normal function but that wasted a lot of stack space
  * for nothing (since 99% of the time the Montgomery code would be called)
  */
 mp_err mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y)
diff --git a/mp_lshd.c b/mp_lshd.c
index bfa8af8..90014e4 100644
--- a/mp_lshd.c
+++ b/mp_lshd.c
@@ -27,7 +27,7 @@ mp_err mp_lshd(mp_int *a, int b)
    a->used += b;
 
    /* much like mp_rshd this is implemented using a sliding window
-    * except the window goes the otherway around.  Copying from
+    * except the window goes the other way around.  Copying from
     * the bottom to the top.  see mp_rshd.c for more info.
     */
    for (x = a->used; x --> b;) {
diff --git a/mp_montgomery_calc_normalization.c b/mp_montgomery_calc_normalization.c
index cc07799..bbb3adb 100644
--- a/mp_montgomery_calc_normalization.c
+++ b/mp_montgomery_calc_normalization.c
@@ -7,7 +7,7 @@
  * shifts with subtractions when the result is greater than b.
  *
  * The method is slightly modified to shift B unconditionally upto just under
- * the leading bit of b.  This saves alot of multiple precision shifting.
+ * the leading bit of b.  This saves a lot of multiple precision shifting.
  */
 mp_err mp_montgomery_calc_normalization(mp_int *a, const mp_int *b)
 {
diff --git a/mp_mul_2.c b/mp_mul_2.c
index 7d7084b..459fbd2 100644
--- a/mp_mul_2.c
+++ b/mp_mul_2.c
@@ -10,7 +10,7 @@ mp_err mp_mul_2(const mp_int *a, mp_int *b)
    int x, oldused;
    mp_digit r;
 
-   /* grow to accomodate result */
+   /* grow to accommodate result */
    if ((err = mp_grow(b, a->used + 1)) != MP_OKAY) {
       return err;
    }
diff --git a/mp_prime_is_prime.c b/mp_prime_is_prime.c
index 7d73864..bb24f59 100644
--- a/mp_prime_is_prime.c
+++ b/mp_prime_is_prime.c
@@ -181,7 +181,7 @@ mp_err mp_prime_is_prime(const mp_int *a, int t, bool *result)
        * The mp_digit's have a defined bit-size but the size of the
        * array a.dp is a simple 'int' and this library can not assume full
        * compliance to the current C-standard (ISO/IEC 9899:2011) because
-       * it gets used for small embeded processors, too. Some of those MCUs
+       * it gets used for small embedded processors, too. Some of those MCUs
        * have compilers that one cannot call standard compliant by any means.
        * Hence the ugly type-fiddling in the following code.
        */
@@ -213,12 +213,12 @@ mp_err mp_prime_is_prime(const mp_int *a, int t, bool *result)
         The function mp_rand() goes to some length to use a cryptographically
         good PRNG. That also means that the chance to always get the same base
         in the loop is non-zero, although very low.
-        If the BPSW test and/or the addtional Frobenious test have been
+        If the BPSW test and/or the additional Frobenious test have been
         performed instead of just the Miller-Rabin test with the bases 2 and 3,
         a single extra test should suffice, so such a very unlikely event
         will not do much harm.
 
-        To preemptivly answer the dangling question: no, a witness does not
+        To preemptively answer the dangling question: no, a witness does not
         need to be prime.
       */
       for (ix = 0; ix < t; ix++) {
diff --git a/mp_reduce_setup.c b/mp_reduce_setup.c
index e12056e..2ce5b96 100644
--- a/mp_reduce_setup.c
+++ b/mp_reduce_setup.c
@@ -4,7 +4,7 @@
 /* SPDX-License-Identifier: Unlicense */
 
 /* pre-calculate the value required for Barrett reduction
- * For a given modulus "b" it calulates the value required in "a"
+ * For a given modulus "b" it calculates the value required in "a"
  */
 mp_err mp_reduce_setup(mp_int *a, const mp_int *b)
 {
diff --git a/mtest/mpi.c b/mtest/mpi.c
index faf09d8..f9cc429 100644
--- a/mtest/mpi.c
+++ b/mtest/mpi.c
@@ -418,7 +418,7 @@ void mp_exch(mp_int *mp1, mp_int *mp2)
 
   Release the storage used by an mp_int, and void its fields so that
   if someone calls mp_clear() again for the same int later, we won't
-  get tollchocked.
+  get tolchocked.
  */
 
 void   mp_clear(mp_int *mp)
diff --git a/s_mp_montgomery_reduce_comba.c b/s_mp_montgomery_reduce_comba.c
index 6f249c4..7472caf 100644
--- a/s_mp_montgomery_reduce_comba.c
+++ b/s_mp_montgomery_reduce_comba.c
@@ -61,7 +61,7 @@ mp_err s_mp_montgomery_reduce_comba(mp_int *x, const mp_int *n, mp_digit rho)
       /* a = a + mu * m * b**i
        *
        * This is computed in place and on the fly.  The multiplication
-       * by b**i is handled by offseting which columns the results
+       * by b**i is handled by offsetting which columns the results
        * are added to.
        *
        * Note the comba method normally doesn't handle carries in the
diff --git a/s_mp_mul_comba.c b/s_mp_mul_comba.c
index 07dd791..1afa1fc 100644
--- a/s_mp_mul_comba.c
+++ b/s_mp_mul_comba.c
@@ -43,7 +43,7 @@ mp_err s_mp_mul_comba(const mp_int *a, const mp_int *b, mp_int *c, int digs)
       ty = MP_MIN(b->used-1, ix);
       tx = ix - ty;
 
-      /* this is the number of times the loop will iterrate, essentially
+      /* this is the number of times the loop will iterate, essentially
          while (tx++ < a->used && ty-- >= 0) { ... }
        */
       iy = MP_MIN(a->used-tx, ty+1);
diff --git a/s_mp_mul_high_comba.c b/s_mp_mul_high_comba.c
index 317346d..74960ac 100644
--- a/s_mp_mul_high_comba.c
+++ b/s_mp_mul_high_comba.c
@@ -35,7 +35,7 @@ mp_err s_mp_mul_high_comba(const mp_int *a, const mp_int *b, mp_int *c, int digs
       ty = MP_MIN(b->used-1, ix);
       tx = ix - ty;
 
-      /* this is the number of times the loop will iterrate, essentially its
+      /* this is the number of times the loop will iterate, essentially its
          while (tx++ < a->used && ty-- >= 0) { ... }
        */
       iy = MP_MIN(a->used-tx, ty+1);
diff --git a/s_mp_mul_karatsuba.c b/s_mp_mul_karatsuba.c
index bf9271f..b465298 100644
--- a/s_mp_mul_karatsuba.c
+++ b/s_mp_mul_karatsuba.c
@@ -27,7 +27,7 @@
  * are saved.  Note also that the call to mp_mul can end up back
  * in this function if the a0, a1, b0, or b1 are above the threshold.
  * This is known as divide-and-conquer and leads to the famous
- * O(N**lg(3)) or O(N**1.584) work which is asymptopically lower than
+ * O(N**lg(3)) or O(N**1.584) work which is asymptotically lower than
  * the standard O(N**2) that the baseline/comba methods use.
  * Generally though the overhead of this method doesn't pay off
  * until a certain size (N ~ 80) is reached.
diff --git a/s_mp_sqr_comba.c b/s_mp_sqr_comba.c
index cb88dcc..1bcc1f9 100644
--- a/s_mp_sqr_comba.c
+++ b/s_mp_sqr_comba.c
@@ -39,7 +39,7 @@ mp_err s_mp_sqr_comba(const mp_int *a, mp_int *b)
       ty = MP_MIN(a->used-1, ix);
       tx = ix - ty;
 
-      /* this is the number of times the loop will iterrate, essentially
+      /* this is the number of times the loop will iterate, essentially
          while (tx++ < a->used && ty-- >= 0) { ... }
        */
       iy = MP_MIN(a->used-tx, ty+1);
diff --git a/typos.sh b/typos.sh
index 7ac6098..cc2aa95 100755
--- a/typos.sh
+++ b/typos.sh
@@ -1,35 +1,36 @@
 #!/bin/sh
 
-sed -i "s/Dimminished/Diminished/g" libtommath/logs/before_after.dem
-sed -i "s/Dimminished/Diminished/g" libtommath/logs/graphs.dem
-sed -i "s/accomodate/accommodate/g" libtommath/mp_mul_2.c
-sed -i "s/accomodate/accommodate/g" libtommath/mp_2expt.c
-sed -i "s/addtional/additional/g" libtommath/mp_prime_is_prime.c
-sed -i "s/alot/a lot/g" libtommath/changes.txt
-sed -i "s/alot/a lot/g" libtommath/mp_exptmod.c
-sed -i "s/alot/a lot/g" libtommath/mp_montgomery_calc_normalization.c
-sed -i "s/annonying/annoying/g" libtommath/astylerc
-sed -i "s/asymptopically/asymptotically/g" libtommath/s_mp_mul_karatsuba.c
-sed -i "s/calulates/calculates/g" libtommath/mp_reduce_setup.c
-sed -i "s/configuraion/configuration/g" libtommath/doc/makefile
-sed -i "s/eliminiation/elimination/g" libtommath/CMakeLists.txt
-sed -i "s/embeded/embedded/g" libtommath/mp_prime_is_prime.c
-sed -i "s/endianess/endianness/g" libtommath/demo/test.c
-sed -i "s/iterrate/iterate/g" libtommath/s_mp_sqr_comba.c
-sed -i "s/iterrate/iterate/g" libtommath/s_mp_mul_high_comba.c
-sed -i "s/iterrate/iterate/g" libtommath/s_mp_mul_comba.c
-sed -i "s/maginitude/magnitude/g" libtommath/mp_cmp_mag.c
-sed -i "s/offseting/offsetting/g" libtommath/s_mp_montgomery_reduce_comba.c
-sed -i "s/ofthe/of the/g" libtommath/doc/bn.tex
-sed -i "s/otherway/other way/g" libtommath/mp_lshd.c
-sed -i "s/packagage/package/g" libtommath/changes.txt
-sed -i "s/preemptivly/preemptively/g" libtommath/mp_prime_is_prime.c
-sed -i "s/probabilty/probability/g" libtommath/doc/bn.tex
-sed -i "s/programms/programs/g" libtommath/doc/bn.tex
-sed -i "s/seperate/separate/g" libtommath/changes.txt
-sed -i "s/simplifiy/simplify/g" libtommath/demo/test.c
-sed -i "s/tollchocked/tolchocked/g" libtommath/mtest/mpi.c
-sed -i "s/trimed/trimmed/g" libtommath/mp_clamp.c
-sed -i "s/triming/trimming/g" libtommath/demo/mtest_opponent.c
-sed -i "s/uncommited/uncommitted/g" libtommath/makefile
-sed -i "s/unsused/unused/g" libtommath/changes.txt
+sed -i "s/Dimminished/Diminished/g" logs/before_after.dem
+sed -i "s/Dimminished/Diminished/g" logs/graphs.dem
+sed -i "s/accomodate/accommodate/g" mp_mul_2.c
+sed -i "s/accomodate/accommodate/g" mp_2expt.c
+sed -i "s/addtional/additional/g" mp_prime_is_prime.c
+sed -i "s/affect/effect/g" demo/mtest_opponent.c
+sed -i "s/alot/a lot/g" changes.txt
+sed -i "s/alot/a lot/g" mp_exptmod.c
+sed -i "s/alot/a lot/g" mp_montgomery_calc_normalization.c
+sed -i "s/annonying/annoying/g" astylerc
+sed -i "s/asymptopically/asymptotically/g" s_mp_mul_karatsuba.c
+sed -i "s/calulates/calculates/g" mp_reduce_setup.c
+sed -i "s/configuraion/configuration/g" doc/makefile
+sed -i "s/eliminiation/elimination/g" CMakeLists.txt
+sed -i "s/embeded/embedded/g" mp_prime_is_prime.c
+sed -i "s/endianess/endianness/g" demo/test.c
+sed -i "s/iterrate/iterate/g" s_mp_sqr_comba.c
+sed -i "s/iterrate/iterate/g" s_mp_mul_high_comba.c
+sed -i "s/iterrate/iterate/g" s_mp_mul_comba.c
+sed -i "s/maginitude/magnitude/g" mp_cmp_mag.c
+sed -i "s/offseting/offsetting/g" s_mp_montgomery_reduce_comba.c
+sed -i "s/ofthe/of the/g" doc/bn.tex
+sed -i "s/otherway/other way/g" mp_lshd.c
+sed -i "s/packagage/package/g" changes.txt
+sed -i "s/preemptivly/preemptively/g" mp_prime_is_prime.c
+sed -i "s/probabilty/probability/g" doc/bn.tex
+sed -i "s/programms/programs/g" doc/bn.tex
+sed -i "s/seperate/separate/g" changes.txt
+sed -i "s/simplifiy/simplify/g" demo/test.c
+sed -i "s/tollchocked/tolchocked/g" mtest/mpi.c
+sed -i "s/trimed/trimmed/g" mp_clamp.c
+sed -i "s/triming/trimming/g" demo/mtest_opponent.c
+sed -i "s/uncommited/uncommitted/g" makefile
+sed -i "s/unsused/unused/g" changes.txt