byte[] q = hostKeyBuffer.getMPInt(); // impint q of dsa
byte[] g = hostKeyBuffer.getMPInt(); // impint g of dsa
byte[] y = hostKeyBuffer.getMPInt(); // impint public key of dsa
// Create SignatureDSA instance for verifying server host
SignatureDSA sig = AlgorithmManager.getManager().createAlgorithm(Algorithms.SIGNATURE_DSS, _session);
sig.setPubKey(y, p, q, g);
sig.update(_H);
return sig.verify(signatureOfH);
} catch(Exception e) {
throw new KexException("Failed to verify host key (DSA)", e);
}
}