我在哪里可以找到算法名称+编号的列表?
Where can I find a list of algorithms name+number?
生成 PGP 密钥对时,您可以选择 Public-密钥算法:
$ 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?
当您 list/browse PGP public 密钥时,此密钥使用的算法以数字表示。使用简单 RSA 2048 密钥的示例:
$ 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
我在这里谈论 algo 1
、digest algo 8
、algo 2
等
我正在寻找一个完整的列表,我可以在其中找到每个算法的名称,给定这个算法编号。
我在 RFC 4880(OpenPGP 消息格式)中找到了一个列表:
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
但此列表似乎不完整:如果我使用 ECC
算法(椭圆曲线密码术)和 Curve 25519
生成密钥,则 public 密钥算法为 22
这是上面列表中的 而不是 。
但是 gpg
二进制文件知道这个算法名称:
$ gpg --list-keys
pub ed25519 2022-04-06 [SC]
7D438CA8D0C6D57EA168521C2C800B246796CFC9
uid [ultimate] John <john.doe@ed25519.org>
sub cv25519 2022-04-06 [E]
是否有所有可用算法及其相关编号的最新列表?
不确定这是否完全满足您的需求,但除了 RFC4880 - 9.1
至 9.4
部分之外,还有以下列表:
9.1. Public-Key Algorithms
9.2. Symmetric-Key Algorithms
9.3. Compression Algorithms
9.4. Hash Algorithms
这是我能找到的:
OpenPGP 中的椭圆曲线密码术 (ECC)
RFC6637,第 5 节 - https://www.rfc-editor.org/rfc/rfc6637#section-5
“未知算法 22”线程
https://lists.gnupg.org/pipermail/gnupg-devel/2017-April/032762.html
算法 22 似乎列在此线程中:
Right we are a bit faster than the specs. The OpenPGP WG agreed on
using 22 for EdDSA in mid 2014. The draft-koch-eddsa-for-openpgp-00
specified the algorithms; meanwhile superseded by
draft-ietf-openpgp-rfc4880bis-01.
+-----------+----------------------------------------------------+
| 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 | ECDH public key algorithm |
| 19 | ECDSA public key algorithm [FIPS186] |
| 20 | Reserved (formerly Elgamal Encrypt or Sign) |
| 21 | Reserved for Diffie-Hellman |
| | (X9.42, as defined for IETF-S/MIME) |
| 22 | EdDSA [I-D.irtf-cfrg-eddsa] |
| 100--110 | Private/Experimental algorithm |
+-----------+----------------------------------------------------+
注意:“摘要”是哈希算法.
的输出,以防万一它对您有所帮助
生成 PGP 密钥对时,您可以选择 Public-密钥算法:
$ 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?
当您 list/browse PGP public 密钥时,此密钥使用的算法以数字表示。使用简单 RSA 2048 密钥的示例:
$ 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
我在这里谈论 algo 1
、digest algo 8
、algo 2
等
我正在寻找一个完整的列表,我可以在其中找到每个算法的名称,给定这个算法编号。
我在 RFC 4880(OpenPGP 消息格式)中找到了一个列表:
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
但此列表似乎不完整:如果我使用 ECC
算法(椭圆曲线密码术)和 Curve 25519
生成密钥,则 public 密钥算法为 22
这是上面列表中的 而不是 。
但是 gpg
二进制文件知道这个算法名称:
$ gpg --list-keys
pub ed25519 2022-04-06 [SC]
7D438CA8D0C6D57EA168521C2C800B246796CFC9
uid [ultimate] John <john.doe@ed25519.org>
sub cv25519 2022-04-06 [E]
是否有所有可用算法及其相关编号的最新列表?
不确定这是否完全满足您的需求,但除了 RFC4880 - 9.1
至 9.4
部分之外,还有以下列表:
9.1. Public-Key Algorithms
9.2. Symmetric-Key Algorithms
9.3. Compression Algorithms
9.4. Hash Algorithms
这是我能找到的:
OpenPGP 中的椭圆曲线密码术 (ECC)
RFC6637,第 5 节 - https://www.rfc-editor.org/rfc/rfc6637#section-5
“未知算法 22”线程
https://lists.gnupg.org/pipermail/gnupg-devel/2017-April/032762.html
算法 22 似乎列在此线程中:
Right we are a bit faster than the specs. The OpenPGP WG agreed on using 22 for EdDSA in mid 2014. The draft-koch-eddsa-for-openpgp-00 specified the algorithms; meanwhile superseded by draft-ietf-openpgp-rfc4880bis-01.
+-----------+----------------------------------------------------+
| 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 | ECDH public key algorithm |
| 19 | ECDSA public key algorithm [FIPS186] |
| 20 | Reserved (formerly Elgamal Encrypt or Sign) |
| 21 | Reserved for Diffie-Hellman |
| | (X9.42, as defined for IETF-S/MIME) |
| 22 | EdDSA [I-D.irtf-cfrg-eddsa] |
| 100--110 | Private/Experimental algorithm |
+-----------+----------------------------------------------------+
注意:“摘要”是哈希算法.
的输出,以防万一它对您有所帮助