switch to gmp

This commit is contained in:
Kevaundray Wedderburn 2025-07-10 15:28:42 +01:00
parent 8690100eea
commit 389620cbc8

View file

@ -1,7 +1,7 @@
package modexp
import (
"github.com/ethereum/go-ethereum/crypto/modexp/bigint"
"github.com/ethereum/go-ethereum/crypto/modexp/gmp"
)
// ModExp performs modular exponentiation on byte arrays
@ -9,5 +9,5 @@ import (
// This uses the bigint implementation by default.
// To use GMP implementation, import crypto/modexp/gmp directly.
func ModExp(base, exp, mod []byte) ([]byte, error) {
return bigint.ModExp(base, exp, mod)
return gmp.ModExp(base, exp, mod)
}