byte[] publicKey = database.getPublicKey(publicHash);
DSASignature sig =
new DSASignature(dsaR, dsaS, Util.joinBytes(toBytes(serverName), nonce.nt(), nonce.nr(), toBytes(command), Util.joinBytes(payload)));
try {
DSAVerify v = new DSAVerify(publicKey);
if (v.verify(sig)) {
boolean validNonce = database.checkAndAddNonce(nonce, publicHash);
boolean userExists = database.haveUser(publicHash);
if (validNonce && userExists) {
try {