diff --git a/lib/bip70/pk.js b/lib/bip70/pk.js index 241e0359..d06de80b 100644 --- a/lib/bip70/pk.js +++ b/lib/bip70/pk.js @@ -99,7 +99,7 @@ rsa.decrypt = function decrypt(N, D, m) { throw new Error('Cannot decrypt.'); return c - .toRed(bn.red(N)) + .toRed(BN.red(N)) .redPow(D) .fromRed() .toArrayLike(Buffer, 'be'); @@ -107,7 +107,7 @@ rsa.decrypt = function decrypt(N, D, m) { rsa.encrypt = function encrypt(N, e, m) { return new BN(m) - .toRed(bn.red(N)) + .toRed(BN.red(N)) .redPow(e) .fromRed() .toArrayLike(Buffer, 'be');