Code example for DSAPublicKey

Methods: getY

		BigInteger q = dsaParams.getQ();
		DSAParameters bcDSAParams = new DSAParameters(dsaParams.getP(), q, dsaParams.getG());
		DSAPublicKey dsaPrivateKey = (DSAPublicKey) pubKey;
		DSAPublicKeyParameters dsaPrivParms = new DSAPublicKeyParameters(dsaPrivateKey.getY(), bcDSAParams);
		// Ian: Note that if you can get the standard DSA implementation you're 
		// using to not hash its input, you should be able to pass it ((256-bit 
		// value) mod q), (rather than truncating the 256-bit value) and all 
		// should be well. 
		// ref: Interop problems with libotr - DSA signature 
		DSASigner dsaSigner = new DSASigner();
		dsaSigner.init(false, dsaPrivParms);
		BigInteger bmpi = new BigInteger(1, b);
		Boolean result = dsaSigner.verifySignature(BigIntegers.asUnsignedByteArray(bmpi.mod(q)), r, s);
		return result;
	public String getFingerprint(PublicKey pubKey) throws OtrCryptoException {