big: Add internal_int_montgomery_calc_normalization.

This commit is contained in:
Jeroen van Rijn
2021-08-27 16:41:16 +02:00
parent 893cc013b5
commit 33df335ec9
2 changed files with 19 additions and 25 deletions
+2 -1
View File
@@ -1548,7 +1548,8 @@ _private_int_log :: proc(a: ^Int, base: DIGIT, allocator := context.allocator) -
which uses the comba method to quickly calculate the columns of the reduction.
Based on Algorithm 14.32 on pp.601 of HAC.
*/
_private_montgomery_reduce_comba :: proc(x, n: ^Int, rho: DIGIT) -> (err: Error) {
_private_montgomery_reduce_comba :: proc(x, n: ^Int, rho: DIGIT, allocator := context.allocator) -> (err: Error) {
context.allocator = allocator;
W: [_WARRAY]_WORD = ---;
if x.used > _WARRAY { return .Invalid_Argument; }