When I use gpg --symmetric --s2k-
and press tab some options appear:
--s2k-cipher-algo
--s2k-count
--s2k-digest-algo
--s2k-mode
What do those options do?
When I use gpg --symmetric --s2k-
and press tab some options appear:
--s2k-cipher-algo
--s2k-count
--s2k-digest-algo
--s2k-mode
What do those options do?
--s2k-mode
sets mode of operation:
--s2k-digest-algo
sets hash function used for password hashing
--s2k-count
sets number of rounds this hash function will be applied
--s2k-cipher-algo
chooses cipher for encrypting the plaintext using the hashed password
In GnuPG 1.4.12 defaults are (found experimentally):
--s2k-mode = 3
--s2k-digest-algo = SHA1 (supports MD5, RIPEMD-160, SHA2s too)
--s2k-count = 65536 (supports from 1024 to 65011712)
--s2k-cipher-algo = CAST5 (supports 3DES, CAST5, Blofish, AES, Twofish, Camellia too)
You can see how your existing keys are encrypted by typing gpg --list-packets ~/.gnupg/secring.gpg
But all algorithms supported by GnuPG can be efficiently automated at GPUs. So I suggest to use side implementation of bcrypt
or scrypt
instead of --s2k-*
options and then give its result as a passphrase to GnuPG with --s2k-mode
set to 0.