Why does The Digital Signing Algorithm encrypt data [...]?
You can't encrypt data using DSA.
However gpg
supports ElGamal encryption, which is an encryption scheme which can be quite naturally derived from the Diffie-Hellman key exchange and typically gpg
pairs "DSA signing" with "ElGamal encryption". Why is it paired like that? Because (in theory) you could use your DSA public key for ElGamal encryption and both scheme's security is strongly related to the discrete logarithm problem, so it makes sense pairing them.
Why is this even an option in gpg ?
Back in the day, the dark ages of crypto, RSA was patented. That is you needed to license it from RSA (the company) to use it. This is one of the reasons why DSA was developed and as established above pairing ElGamal with DSA makes sense. Now of course gpg
was also affected by the patent issues surrounding RSA which is (I could imagine) why they originally offered only DSA / ElGamal. The RSA patents have expired in the 2000s which is why we have now RSA for everything and DSA / ElGamal mostly is left in for backwards compatibility and to let users a choice on factoring vs discrete logarithm based security.
Is with DSA "encrypted" ( if it even is ) data secure ?
As this means that the data is actually encrypted with ElGamal and only used to encrypt the key for hybrid encryption, I'm very confident that this is actually secure.
gpg --list-keys
reports, and if you have a file foo.gpg, whatpgpdump < foo.gpg
reports. But you should assemble all this into a query to a GnuPG support forum, not crypto.se. $\endgroup$