// Generate implicit overall hash.
md256.update(headers, 0, x);
md256.update(encryptedDataHash);
byte[] overallHash = md256.digest();
// Now sign it
DSASignature sig = DSA.sign(pubKey.getGroup(), privKey, new NativeBigInteger(1, overallHash), r);
// Pack R and S into 32 bytes each, and copy to headers.
// Then create and return the ClientSSKBlock.
byte[] rBuf = truncate(sig.getR().toByteArray(), SSKBlock.SIG_R_LENGTH);
byte[] sBuf = truncate(sig.getS().toByteArray(), SSKBlock.SIG_S_LENGTH);
System.arraycopy(rBuf, 0, headers, x, rBuf.length);
x += rBuf.length;
System.arraycopy(sBuf, 0, headers, x, sBuf.length);
x += sBuf.length;
if (x != SSKBlock.TOTAL_HEADERS_LENGTH)