added Diffie-Hellman check
@@ -388,7 +388,8 @@ public boolean isEncryptionKey()
int algorithm = publicPk.getAlgorithm();
return ((algorithm == RSA_GENERAL) || (algorithm == RSA_ENCRYPT)
- || (algorithm == ELGAMAL_ENCRYPT) || (algorithm == ELGAMAL_GENERAL) || algorithm == ECDH);
+ || (algorithm == ELGAMAL_ENCRYPT) || (algorithm == ELGAMAL_GENERAL)
+ || (algorithm == DIFFIE_HELLMAN) || (algorithm == ECDH));
}
/**
