1

I am trying to find the default KDF for my version of gpg:

  • gpg (GnuPG) 2.2.6
  • libgcrypt 1.8.2

Does anyone know how?

peterh
  • 2,938
  • 6
  • 25
  • 31
Patriot
  • 277
  • 3
  • 15

1 Answers1

2

GnuPG uses an algorithm called S2K (String-to-Key). This isn't unique to GnuPG, and is actually part of the official OpenPGP standard, specifically RFC 4880 ยง 3.7. The strongest version of this KDF, version 3, works by repeating the key and the salt many times and hashing the whole result.

The specific hash algorithm used is specified with --s2k-digest-algo.

forest
  • 64,616
  • 20
  • 206
  • 257