title: Where can I find a list of algorithms name+number?
body: <p>When you generate an PGP key-pair, you can choose a Public-Key algorithm:</p>
  <pre><code>$ gpg --expert --full-gen-key
  gpg (GnuPG) 2.2.19; Copyright (C) 2019 Free Software Foundation, Inc.
  
  Please select what kind of key you want:
     (1) RSA and RSA (default)
     (2) DSA and Elgamal
     (3) DSA (sign only)
     (4) RSA (sign only)
     (7) DSA (set your own capabilities)
     (8) RSA (set your own capabilities)
     (9) ECC and ECC
    (10) ECC (sign only)
    (11) ECC (set your own capabilities)
    (13) Existing key
    (14) Existing key from card
  Your selection?
  </code></pre>
  <p>When you list/browse PGP public keys, the used algorithms for this key is represented as a number. Example with a simple RSA 2048 key:</p>
  <pre><code>$ gpg --export me@localhost.com | gpg --list-packets --verbose
  ...
  :public key packet:
      version 4, algo 1, created 1531406055, expires 0s 0
  ...
  :signature packet: algo 1, keyid 47F915B113C9BC18
      version 4, created 1531406055, md5len 0, sigclass 0x13
      digest algo 2, begin of digest 7a 9c
  ...
  :public sub key packet:
      version 4, algo 1, created 1531406055, expires 0
  </code></pre>
  <p>I'm here talking about the <code>algo 1</code>, <code>digest algo 8</code>, <code>algo 2</code> etc.</p>
  <p><strong>I'm looking for a complete list where I can find the name of each algo, given this algo number.</strong></p>
  <p>I found a list in the <a href="https://datatracker.ietf.org/doc/html/rfc4880#section-9.1" rel="nofollow noreferrer">RFC 4880</a> (<em>OpenPGP Message Format</em>):</p>
  <pre><code>      ID           Algorithm
        --           ---------
        1          - RSA (Encrypt or Sign) [HAC]
        2          - RSA Encrypt-Only [HAC]
        3          - RSA Sign-Only [HAC]
        16         - Elgamal (Encrypt-Only) [ELGAMAL] [HAC]
        17         - DSA (Digital Signature Algorithm) [FIPS186] [HAC]
        18         - Reserved for Elliptic Curve
        19         - Reserved for ECDSA
        20         - Reserved (formerly Elgamal Encrypt or Sign)
        21         - Reserved for Diffie-Hellman (X9.42,
                     as defined for IETF-S/MIME)
        100 to 110 - Private/Experimental algorithm
  </code></pre>
  <p>But this list seems to be incomplete: if I generate a key with <code>ECC</code> algorithm (Elliptic Curve Cryptography) and <code>Curve 25519</code>, the public key algo is <code>22</code> which is <strong>not</strong> in the list above.
  However <code>gpg</code> binary is aware of this algo name:</p>
  <pre><code>$ gpg --list-keys
  
  pub   ed25519 2022-04-06 [SC]
        7D438CA8D0C6D57EA168521C2C800B246796CFC9
  uid           [ultimate] John &lt;john.doe@ed25519.org&gt;
  sub   cv25519 2022-04-06 [E]
  </code></pre>
  <p>Is there an up-to-date list of all available algos and their associated number somewhere ?</p>