diff options
Diffstat (limited to 'src/mp_mul.cpp')
-rw-r--r-- | src/mp_mul.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mp_mul.cpp b/src/mp_mul.cpp index ecebf823a..2870846fb 100644 --- a/src/mp_mul.cpp +++ b/src/mp_mul.cpp @@ -11,6 +11,18 @@ namespace Botan { namespace { /************************************************* +* Simple O(N^2) Multiplication * +*************************************************/ +void bigint_simple_mul(word z[], const word x[], u32bit x_size, + const word y[], u32bit y_size) + { + clear_mem(z, x_size + y_size); + + for(u32bit j = 0; j != x_size; ++j) + z[j+y_size] = bigint_mul_add_words(z + j, y, y_size, x[j]); + } + +/************************************************* * Karatsuba Multiplication Operation * *************************************************/ void karatsuba_mul(word z[], const word x[], const word y[], u32bit N, |