Skip to content

Commit

Permalink
multiprecision: refactor big_int and inverse_extended_euclidean_algor…
Browse files Browse the repository at this point in the history
…ithm
  • Loading branch information
ioxid committed Dec 18, 2024
1 parent f72c4cb commit 27fe06e
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 517 deletions.
4 changes: 2 additions & 2 deletions crypto3/benchmarks/multiprecision/big_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ BOOST_AUTO_TEST_CASE(inverse_extended_euclidean_algorithm_test) {
auto x_modular = x_mod_ct_odd;

nil::crypto3::bench::run_benchmark<>(
"[odd modulus][compile time] inverse_extended_euclidean_algorithm_test", [&]() {
x_modular = inverse_extended_euclidean_algorithm(x_modular);
"[odd modulus][compile time] inverse with extended euclidean algorithm", [&]() {
x_modular = inverse(x_modular);
++x_modular;
return x_modular;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ namespace nil {
}

constexpr element_fp inversed() const {
return element_fp(inverse_extended_euclidean_algorithm(data));
return element_fp(inverse(data));
}

constexpr element_fp squared() const {
Expand Down
Loading

0 comments on commit 27fe06e

Please sign in to comment.