diff options
| author | gingerBill <bill@gingerbill.org> | 2024-03-13 15:12:19 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-03-13 15:12:19 +0000 |
| commit | 4aec2de7bd186bbdfe9aa0f890f9a276480c80c2 (patch) | |
| tree | 7ace46f2786a6a823e12358d53988392593617cb /core | |
| parent | ac10f504e467053861fcf00b86bbb2904ddadafe (diff) | |
| parent | d62c92f5a9891267e6ee2c121085815ce6734cf6 (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odin
Diffstat (limited to 'core')
| -rw-r--r-- | core/math/big/internal.odin | 1 | ||||
| -rw-r--r-- | core/math/big/prime.odin | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/core/math/big/internal.odin b/core/math/big/internal.odin index 03623e7f2..07e1e6c03 100644 --- a/core/math/big/internal.odin +++ b/core/math/big/internal.odin @@ -2047,6 +2047,7 @@ internal_int_inverse_modulo :: proc(dest, a, b: ^Int, allocator := context.alloc return _private_inverse_modulo(dest, a, b) } +internal_int_invmod :: internal_int_inverse_modulo internal_invmod :: proc{ internal_int_inverse_modulo, } /* diff --git a/core/math/big/prime.odin b/core/math/big/prime.odin index 110c10239..cb0b08dbb 100644 --- a/core/math/big/prime.odin +++ b/core/math/big/prime.odin @@ -44,7 +44,7 @@ internal_int_prime_is_divisible :: proc(a: ^Int, allocator := context.allocator) Computes res == G**X mod P. Assumes `res`, `G`, `X` and `P` to not be `nil` and for `G`, `X` and `P` to have been initialized. */ -internal_int_exponent_mod :: proc(res, G, X, P: ^Int, allocator := context.allocator) -> (err: Error) { +internal_int_power_modulo :: proc(res, G, X, P: ^Int, allocator := context.allocator) -> (err: Error) { context.allocator = allocator dr: int @@ -112,6 +112,9 @@ internal_int_exponent_mod :: proc(res, G, X, P: ^Int, allocator := context.alloc */ return _private_int_exponent_mod(res, G, X, P, 0) } +internal_int_exponent_mod :: internal_int_power_modulo +internal_int_powmod :: internal_int_power_modulo +internal_powmod :: proc { internal_int_power_modulo, } /* Kronecker/Legendre symbol (a|p) @@ -1411,4 +1414,4 @@ number_of_rabin_miller_trials :: proc(bit_size: int) -> (number_of_trials: int) case: return 2 /* For keysizes bigger than 10_240 use always at least 2 Rounds */ } -}
\ No newline at end of file +} |