1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg: Add algo constants for PQC.

* common/openpgpdefs.h (PUBKEY_ALGO_KY768_25519): New.
(PUBKEY_ALGO_KY1024_448): New.
(PUBKEY_ALGO_DIL3_25519): New.
(PUBKEY_ALGO_DIL5_448): New.
(PUBKEY_ALGO_SPHINX_SHA2): New.
* g10/keygen.c (parse_key_parameter_part): Force v5 keys for these
  algos.
* g10/keyid.c (pubkey_string): Add mapping.
* g10/misc.c (openpgp_pk_algo_usage): Add standard key usage.
--

See draft-wussler-openpgp-pqc-01.txt for the code points.  To limit
the number of algorithms, only MUST and SHOULD algorithms are
considered.
This commit is contained in:
Werner Koch 2023-07-07 10:21:39 +02:00
parent 8cacfce898
commit 9f39e4da29
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 53 additions and 3 deletions

View file

@ -799,6 +799,19 @@ openpgp_pk_algo_usage ( int algo )
case PUBKEY_ALGO_ECDSA:
case PUBKEY_ALGO_EDDSA:
use = PUBKEY_USAGE_CERT | PUBKEY_USAGE_SIG | PUBKEY_USAGE_AUTH;
break;
case PUBKEY_ALGO_KY768_25519:
case PUBKEY_ALGO_KY1024_448:
use = PUBKEY_USAGE_ENC | PUBKEY_USAGE_RENC;
break;
case PUBKEY_ALGO_DIL3_25519:
case PUBKEY_ALGO_DIL5_448:
case PUBKEY_ALGO_SPHINX_SHA2:
use = PUBKEY_USAGE_CERT | PUBKEY_USAGE_SIG;
break;
default:
break;
}