# gnupg: display digest of key [closed]

How can I display what digest algorithm has a key? If I import a public key which has MD5 as digest, I get a warning about this weak algorith. But how can I check, what digest algorithms all my keys use in my keyring?

-

## closed as off-topic by fgrieu, DrLecter, e-sushi, rath, figlesquidgeFeb 14 at 20:24

• This question does not appear to be about cryptography within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question is off-topic because it is about using a cryptographic program –  fgrieu Feb 14 at 10:56
To clarify, this website is about the science of cryptography, and how one develops/applies cryptographic designs. Your question is about how to use a product already developed, rather like asking 'Where is the ignition in a Ford Focus?' on a 'Mechanical engineering' site. Hope that made sense –  figlesquidge Feb 14 at 20:24
You can use gpg --list-packets [keyfile] to see a list of all packets and their contents. All hash algorithms have numbers which you can look up in section 9.4 of RFC 4880, "Hash Algorithms".
Alternatively, use pgpdump [keyfile] to create a similar output, but already containing the algorithm names instead of their numeric identifiers.