diff --git a/src/eckey.js b/src/eckey.js index 170b9dc..4d9f9e3 100644 --- a/src/eckey.js +++ b/src/eckey.js @@ -11,7 +11,7 @@ var sec = require('./sec') var ecparams = sec('secp256k1') function ECKey(D, compressed) { - assert(D.compareTo(BigInteger.ZERO) > 0, 'Private key must be greater than 0') + assert(D.signum() > 0, 'Private key must be greater than 0') assert(D.compareTo(ecparams.getN()) < 0, 'Private key must be less than the curve order') var Q = ecparams.getG().multiply(D)