code: function RSADoPrivate(x) {
    if(this.p == null || this.q == null)
      return x.modPow(this.d, this.n);
  
    // TODO: re-calculate any missing CRT params
    var xp = x.mod(this.p).modPow(this.dmp1, this.p);
    var xq = x.mod(this.q).modPow(this.dmq1, this.q);
  
    while(xp.compareTo(xq) < 0)
      xp = xp.add(this.p);
    return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);
  }
docs: Perform raw private operation on "x": return x^d (mod n)