Skip to content

Commit e36293e

Browse files
committed
adjust range checks
1 parent 454b625 commit e36293e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/evmone_precompiles/ecc.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -692,10 +692,10 @@ std::array<SignedScalar<typename Curve::uint_type>, 2> decompose(
692692
// static_assert(Curve::Y2 < Curve::X1);
693693
// static_assert(Curve::X2 < Curve::Y2);
694694
// static_assert(Curve::MINUS_Y1 < Curve::X2);
695-
// [[maybe_unused]] static constexpr auto K1_MAX = Curve::Y2;
696-
// [[maybe_unused]] static constexpr auto K2_MAX = Curve::X2 - 1;
697-
// assert(k1.value <= K1_MAX);
698-
// assert(k2.value <= K2_MAX);
695+
[[maybe_unused]] static constexpr auto K1_MAX = std::numeric_limits<intx::uint128>::max();
696+
[[maybe_unused]] static constexpr auto K2_MAX = K1_MAX;
697+
assert(k1.value <= K1_MAX);
698+
assert(k2.value <= K2_MAX);
699699

700700
return {k1, k2};
701701
}

0 commit comments

Comments
 (0)