// Calculate the shared secret
DHBasicAgreement dhAgree = new DHBasicAgreement();
dhAgree.init(dhPair.getPrivate());
BigInteger agreement = dhAgree.calculateAgreement(new DHPublicKeyParameters(Ys, dhParams));
this.pms = BigIntegers.asUnsignedByteArray(agreement);
}
private void validateKeyUsage(X509CertificateStructure c, int keyUsageBits)