Why is the error "cannot create signature: no such algorithm: MD5withDSA for provider BC" being presented when attempting to encrypt and sign a file using a PGP Encrypt task?
The reason that this particular error is being thrown, is that by default, Java does not provide a method to do MD5 hashing of a file using a DSA key. When the file is being hashed with MD5 and is using a DSA key to do so, the application attempts to perform the requested action. However, since there is no method to do so built into the JVM, the error is thrown.
In order to resolve the error, simply switch from using a DSA (Diffie Hellman/DSS) key to using an RSA key when selecting a secret key to sign the encrypted file on the PGP Encrypt task. After selecting the new RSA key, the error will no longer be presented as there is a method built into the JVM to hash file using the MD5 algorithm with an RSA key.