diff options
author | lloyd <[email protected]> | 2010-03-15 23:08:11 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-15 23:08:11 +0000 |
commit | b96139b84113b583a453c820127c4765c6f0f66f (patch) | |
tree | f720e36743ff5577dbb477ba6a91506ff05394f6 /src | |
parent | 72f13064111235cf29db17cafdf0546ba9094a19 (diff) |
Name other params. Remove decls of functions that don't exist
Diffstat (limited to 'src')
-rw-r--r-- | src/math/bigint/mp_core.h | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/src/math/bigint/mp_core.h b/src/math/bigint/mp_core.h index 0776d3147..7d601d820 100644 --- a/src/math/bigint/mp_core.h +++ b/src/math/bigint/mp_core.h @@ -43,38 +43,60 @@ void bigint_sub3(word z[], /* * Shift Operations */ -void bigint_shl1(word[], u32bit, u32bit, u32bit); -void bigint_shl2(word[], const word[], u32bit, u32bit, u32bit); -void bigint_shr1(word[], u32bit, u32bit, u32bit); -void bigint_shr2(word[], const word[], u32bit, u32bit, u32bit); +void bigint_shl1(word x[], u32bit x_size, + u32bit word_shift, u32bit bit_shift); + +void bigint_shr1(word x[], u32bit x_size, + u32bit word_shift, u32bit bit_shift); + +void bigint_shl2(word y[], const word x[], u32bit x_size, + u32bit word_shift, u32bit bit_shift); + +void bigint_shr2(word y[], const word x[], u32bit x_size, + u32bit word_shift, u32bit bit_shift); /* * Simple O(N^2) Multiplication and Squaring */ -void bigint_simple_mul(word z[], const word x[], u32bit x_size, +void bigint_simple_mul(word z[], + const word x[], u32bit x_size, const word y[], u32bit y_size); + void bigint_simple_sqr(word z[], const word x[], u32bit x_size); /* * Linear Multiply */ -void bigint_linmul2(word[], u32bit, word); -void bigint_linmul3(word[], const word[], u32bit, word); -void bigint_linmul_add(word[], u32bit, const word[], u32bit, word); +void bigint_linmul2(word x[], u32bit x_size, word y); +void bigint_linmul3(word z[], const word x[], u32bit x_size, word y); /* * Montgomery Reduction */ -void bigint_monty_redc(word[], u32bit, const word[], u32bit, word); +void bigint_monty_redc(word z[], u32bit z_size, + const word x[], u32bit x_size, word u); /* * Misc Utility Operations */ -u32bit bigint_divcore(word, word, word, word, word, word); -s32bit bigint_cmp(const word[], u32bit, const word[], u32bit); -word bigint_divop(word, word, word); -word bigint_modop(word, word, word); -void bigint_wordmul(word, word, word*, word*); +u32bit bigint_divcore(word q, word y1, word y2, + word x1, word x2, word x3); + +/** +* Compare x and y +*/ +s32bit bigint_cmp(const word x[], u32bit x_size, + const word y[], u32bit y_size); + +/** +* Compute ((n1<<bits) + n0) / d +*/ +word bigint_divop(word n1, word n0, word d); + +/** +* Compute ((n1<<bits) + n0) % d +*/ +word bigint_modop(word n1, word n0, word d); /* * Comba Multiplication / Squaring |