Hello,
When a file with symmetric key is encrypted, it can be seen in the terminal that the default encryption algorithm is AES256 but does not specify which is the hash algorithm.
Hello, what is the hash algorithm used by default in the GPG?
Hello,
When a file with symmetric key is encrypted, it can be seen in the terminal that the default encryption algorithm is AES256 but does not specify which is the hash algorithm.
Hello, what is the hash algorithm used by default in the GPG?
Hi @Aschuwerve,
with a symmetric encryption there is no hash used.
(What would you use it for?)
As for a signature (which is asymmetric cryptography) I believe it depends on the settings of the recipient keys (in case there is encryption as well) and personal settings, see OpenPGP Options (Using the GNU Privacy Guard) section --personal-digest-preferences
.
Best Regards,
Bernhard
Why do you say a hash is not used? if used for the passphrase.
it is also possible to do a symmetric encryption with an asymmetric signature. You can read that in the official documentation.
That is correct, the key derivation function that will turn the (potentially) human readable passphrase into the key used for the symmetric encryption. Sorry, I was focused too much on the “encryption” part of the question when answering initially.
OpenPGP Options (Using the GNU Privacy Guard) reads:
--s2k-digest-algo name
Use name as the digest algorithm used to mangle the passphrases
for symmetric encryption. The default is SHA-1.
(also note the other options starting with --s2k
for the salt and the rounds of hashing)
Yes. The option I’ve linked in my first answer has the documentation. As there are no recipient pubkeys I think that option or the rank will be used. I have not seen that rank
was documented in a brief look, so this maybe something to look up in the source code. It may just be the order by which --version
lists the algorithms, though.
Is it possible to mix different encryption algorithms in GPG as Veracrypt does?
If you mean to apply two encryption algorithms after another (aka a chain): As far as I know, GnuPG has no direct methods of doing this. (I haven’t checked what the latest “Post-Quantum Cryptography” options in the 2.6. experimental release series offers in this regard, though.)