mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
switch to gmp
This commit is contained in:
parent
8690100eea
commit
389620cbc8
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
package modexp
|
package modexp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/ethereum/go-ethereum/crypto/modexp/bigint"
|
"github.com/ethereum/go-ethereum/crypto/modexp/gmp"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ModExp performs modular exponentiation on byte arrays
|
// ModExp performs modular exponentiation on byte arrays
|
||||||
|
|
@ -9,5 +9,5 @@ import (
|
||||||
// This uses the bigint implementation by default.
|
// This uses the bigint implementation by default.
|
||||||
// To use GMP implementation, import crypto/modexp/gmp directly.
|
// To use GMP implementation, import crypto/modexp/gmp directly.
|
||||||
func ModExp(base, exp, mod []byte) ([]byte, error) {
|
func ModExp(base, exp, mod []byte) ([]byte, error) {
|
||||||
return bigint.ModExp(base, exp, mod)
|
return gmp.ModExp(base, exp, mod)
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue