}
  private BigInteger[] computeRS(final byte[] digestBytes)  {    final BigInteger p = ((DSAPrivateKey) privateKey).getParams().getP();    final BigInteger q = ((DSAPrivateKey) privateKey).getParams().getQ();    final BigInteger g = ((DSAPrivateKey) privateKey).getParams().getG();    final BigInteger x = ((DSAPrivateKey) privateKey).getX();    final BigInteger m = new BigInteger(1, digestBytes);    BigInteger k, r, s;    final byte[] kb = new byte[20]; // we'll use 159 bits only    while (true)      {        this.nextRandomBytes(kb);        k = new BigInteger(1, kb);        k.clearBit(159);        r = g.modPow(k, p).mod(q);        if (r.equals(BigInteger.ZERO))          {            continue;          }        s = m.add(x.multiply(r)).multiply(k.modInverse(q)).mod(q);        if (s.equals(BigInteger.ZERO))          {            continue;          }        break;      }    return new BigInteger[] { r, s };  }