@ -143,7 +143,7 @@ HDKey.prototype.deriveChild = function (index) {
var Ki = curve.G.multiply(pIL).add(this._publicPoint)
// In case parse256(IL) >= n or Ki is the point at infinity, one should proceed with the next value for i
if (curve.isInfinity(Ki)) {
if (pIL.compareTo(curve.n) >= 0 || curve.isInfinity(Ki)) {
return this.derive(index + 1)
}