private static byte[] convertBIGINTtoASN1(BigInteger r, BigInteger s)
throws IOException {
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
DEROutputStream dOut = new DEROutputStream(bOut);
DERConstructedSequence seq = new DERConstructedSequence();
seq.addObject(new DERInteger(r));
seq.addObject(new DERInteger(s));
dOut.writeObject(seq);
return bOut.toByteArray();
}