diff options
author | Jack Lloyd <[email protected]> | 2018-03-01 16:43:00 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-03-01 16:43:00 -0500 |
commit | 03e3d3dac4b50a6da3cfec2971460c1182cebd9d (patch) | |
tree | 138de40cea1cbc886167fbeb41bf0748de5805ba /src/lib/math/mp | |
parent | 23e248260ea913227a8d224f64cd9ff592ac8b6b (diff) |
Remove BigInt using functions from mp layer
Diffstat (limited to 'src/lib/math/mp')
-rw-r--r-- | src/lib/math/mp/info.txt | 4 | ||||
-rw-r--r-- | src/lib/math/mp/mp_core.h | 18 | ||||
-rw-r--r-- | src/lib/math/mp/mp_karat.cpp | 12 | ||||
-rw-r--r-- | src/lib/math/mp/mp_monty.cpp | 23 |
4 files changed, 0 insertions, 57 deletions
diff --git a/src/lib/math/mp/info.txt b/src/lib/math/mp/info.txt index 4d748a495..0f5b075f0 100644 --- a/src/lib/math/mp/info.txt +++ b/src/lib/math/mp/info.txt @@ -11,7 +11,3 @@ mp_core.h mp_madd.h mp_asmi.h </header:internal> - -<requires> -bigint -</requires> diff --git a/src/lib/math/mp/mp_core.h b/src/lib/math/mp/mp_core.h index 9efcec952..877c0cad7 100644 --- a/src/lib/math/mp/mp_core.h +++ b/src/lib/math/mp/mp_core.h @@ -14,8 +14,6 @@ namespace Botan { -class BigInt; - /* * The size of the word type, in bits */ @@ -135,20 +133,6 @@ void bigint_monty_redc(word z[], word workspace[], size_t ws_size); -/* -* Montgomery Multiplication -*/ -void bigint_monty_mul(BigInt& z, const BigInt& x, const BigInt& y, - const word p[], size_t p_size, word p_dash, - word workspace[], size_t ws_size); - -/* -* Montgomery Squaring -*/ -void bigint_monty_sqr(BigInt& z, const BigInt& x, - const word p[], size_t p_size, word p_dash, - word workspace[], size_t ws_size); - /** * Compare x and y */ @@ -183,8 +167,6 @@ void bigint_comba_sqr16(word out[32], const word in[16]); /* * High Level Multiplication/Squaring Interfaces */ -void bigint_mul(BigInt& z, const BigInt& x, const BigInt& y, - word workspace[], size_t ws_size); void bigint_mul(word z[], size_t z_size, const word x[], size_t x_size, size_t x_sw, diff --git a/src/lib/math/mp/mp_karat.cpp b/src/lib/math/mp/mp_karat.cpp index 4d600efab..6e1414cfa 100644 --- a/src/lib/math/mp/mp_karat.cpp +++ b/src/lib/math/mp/mp_karat.cpp @@ -250,18 +250,6 @@ size_t karatsuba_size(size_t z_size, size_t x_size, size_t x_sw) } -/* -* Multiplication Algorithm Dispatcher -*/ -void bigint_mul(BigInt& z, const BigInt& x, const BigInt& y, - word workspace[], size_t ws_size) - { - return bigint_mul(z.mutable_data(), z.size(), - x.data(), x.size(), x.sig_words(), - y.data(), y.size(), y.sig_words(), - workspace, ws_size); - } - void bigint_mul(word z[], size_t z_size, const word x[], size_t x_size, size_t x_sw, const word y[], size_t y_size, size_t y_sw, diff --git a/src/lib/math/mp/mp_monty.cpp b/src/lib/math/mp/mp_monty.cpp index cc6388f4d..b2b3b5e4e 100644 --- a/src/lib/math/mp/mp_monty.cpp +++ b/src/lib/math/mp/mp_monty.cpp @@ -97,27 +97,4 @@ void bigint_monty_redc(word z[], BOTAN_ASSERT(borrow == 0 || borrow == 1, "Expected borrow"); } -void bigint_monty_mul(BigInt& z, const BigInt& x, const BigInt& y, - const word p[], size_t p_size, word p_dash, - word ws[], size_t ws_size) - { - bigint_mul(z, x, y, ws, ws_size); - - bigint_monty_redc(z.mutable_data(), - p, p_size, p_dash, - ws, ws_size); - } - -void bigint_monty_sqr(BigInt& z, const BigInt& x, const word p[], - size_t p_size, word p_dash, word ws[], size_t ws_size) - { - bigint_sqr(z.mutable_data(), z.size(), - x.data(), x.size(), x.sig_words(), - ws, ws_size); - - bigint_monty_redc(z.mutable_data(), - p, p_size, p_dash, - ws, ws_size); - } - } |