diff --git a/ALGORITHMS.md b/ALGORITHMS.md index b036473e..6c12bfc6 100644 --- a/ALGORITHMS.md +++ b/ALGORITHMS.md @@ -38,6 +38,16 @@ As standardization for these algorithms within TLS is not done, all TLS code poi | p256_kyber768 | 0x639A | Yes | OQS_CODEPOINT_P256_KYBER768 | | kyber1024 | 0x023D | Yes | OQS_CODEPOINT_KYBER1024 | | p521_kyber1024 | 0x2F3D | Yes | OQS_CODEPOINT_P521_KYBER1024 | +| mlkem512 | 0x0247 | Yes | OQS_CODEPOINT_MLKEM512 | +| p256_mlkem512 | 0x2F47 | Yes | OQS_CODEPOINT_P256_MLKEM512 | +| x25519_mlkem512 | 0x2FB2 | Yes | OQS_CODEPOINT_X25519_MLKEM512 | +| mlkem768 | 0x0248 | Yes | OQS_CODEPOINT_MLKEM768 | +| p384_mlkem768 | 0x2F48 | Yes | OQS_CODEPOINT_P384_MLKEM768 | +| x448_mlkem768 | 0x2FB3 | Yes | OQS_CODEPOINT_X448_MLKEM768 | +| x25519_mlkem768 | 0x2FB4 | Yes | OQS_CODEPOINT_X25519_MLKEM768 | +| p256_mlkem768 | 0x2FB5 | Yes | OQS_CODEPOINT_P256_MLKEM768 | +| mlkem1024 | 0x0249 | Yes | OQS_CODEPOINT_MLKEM1024 | +| p521_mlkem1024 | 0x2F49 | Yes | OQS_CODEPOINT_P521_MLKEM1024 | | bikel1 | 0x0241 | Yes | OQS_CODEPOINT_BIKEL1 | | p256_bikel1 | 0x2F41 | Yes | OQS_CODEPOINT_P256_BIKEL1 | | x25519_bikel1 | 0x2FAE | Yes | OQS_CODEPOINT_X25519_BIKEL1 | @@ -61,6 +71,13 @@ As standardization for these algorithms within TLS is not done, all TLS code poi | p384_dilithium3 | 0xfea4 |Yes| OQS_CODEPOINT_P384_DILITHIUM3 | dilithium5 | 0xfea5 |Yes| OQS_CODEPOINT_DILITHIUM5 | p521_dilithium5 | 0xfea6 |Yes| OQS_CODEPOINT_P521_DILITHIUM5 +| mldsa44 | 0xfed0 |Yes| OQS_CODEPOINT_MLDSA44 +| p256_mldsa44 | 0xfed3 |Yes| OQS_CODEPOINT_P256_MLDSA44 +| rsa3072_mldsa44 | 0xfed4 |Yes| OQS_CODEPOINT_RSA3072_MLDSA44 +| mldsa65 | 0xfed1 |Yes| OQS_CODEPOINT_MLDSA65 +| p384_mldsa65 | 0xfed5 |Yes| OQS_CODEPOINT_P384_MLDSA65 +| mldsa87 | 0xfed2 |Yes| OQS_CODEPOINT_MLDSA87 +| p521_mldsa87 | 0xfed6 |Yes| OQS_CODEPOINT_P521_MLDSA87 | falcon512 | 0xfeae |Yes| OQS_CODEPOINT_FALCON512 | p256_falcon512 | 0xfeaf |Yes| OQS_CODEPOINT_P256_FALCON512 | rsa3072_falcon512 | 0xfeb0 |Yes| OQS_CODEPOINT_RSA3072_FALCON512 @@ -139,6 +156,13 @@ adapting the OIDs of all supported signature algorithms as per the table below. | dilithium5_p384 | 2.16.840.1.114027.80.8.1.11 |Yes| OQS_OID_DILITHIUM5_p384 | dilithium5_bp384 | 2.16.840.1.114027.80.8.1.12 |Yes| OQS_OID_DILITHIUM5_bp384 | dilithium5_ed448 | 2.16.840.1.114027.80.8.1.13 |Yes| OQS_OID_DILITHIUM5_ed448 +| mldsa44 | 1.3.6.1.4.1.2.267.12.4.4 |Yes| OQS_OID_MLDSA44 +| p256_mldsa44 | 1.3.9999.7.1 |Yes| OQS_OID_P256_MLDSA44 +| rsa3072_mldsa44 | 1.3.9999.7.2 |Yes| OQS_OID_RSA3072_MLDSA44 +| mldsa65 | 1.3.6.1.4.1.2.267.12.6.5 |Yes| OQS_OID_MLDSA65 +| p384_mldsa65 | 1.3.9999.7.3 |Yes| OQS_OID_P384_MLDSA65 +| mldsa87 | 1.3.6.1.4.1.2.267.12.8.7 |Yes| OQS_OID_MLDSA87 +| p521_mldsa87 | 1.3.9999.7.4 |Yes| OQS_OID_P521_MLDSA87 | falcon512 | 1.3.9999.3.6 |Yes| OQS_OID_FALCON512 | p256_falcon512 | 1.3.9999.3.7 |Yes| OQS_OID_P256_FALCON512 | rsa3072_falcon512 | 1.3.9999.3.8 |Yes| OQS_OID_RSA3072_FALCON512 @@ -180,48 +204,58 @@ If [OQS_KEM_ENCODERS](CONFIGURE.md#OQS_KEM_ENCODERS) is enabled the following li |Algorithm name | default OID | environment variable | |---------------|:-----------------:|----------------------| -| frodo640aes | 1.3.9999.99.50 | OQS_OID_FRODO640AES -| p256_frodo640aes | 1.3.9999.99.49 | OQS_OID_P256_FRODO640AES -| x25519_frodo640aes | 1.3.9999.99.38 | OQS_OID_X25519_FRODO640AES -| frodo640shake | 1.3.9999.99.52 | OQS_OID_FRODO640SHAKE -| p256_frodo640shake | 1.3.9999.99.51 | OQS_OID_P256_FRODO640SHAKE -| x25519_frodo640shake | 1.3.9999.99.39 | OQS_OID_X25519_FRODO640SHAKE -| frodo976aes | 1.3.9999.99.54 | OQS_OID_FRODO976AES -| p384_frodo976aes | 1.3.9999.99.53 | OQS_OID_P384_FRODO976AES -| x448_frodo976aes | 1.3.9999.99.40 | OQS_OID_X448_FRODO976AES -| frodo976shake | 1.3.9999.99.56 | OQS_OID_FRODO976SHAKE -| p384_frodo976shake | 1.3.9999.99.55 | OQS_OID_P384_FRODO976SHAKE -| x448_frodo976shake | 1.3.9999.99.41 | OQS_OID_X448_FRODO976SHAKE -| frodo1344aes | 1.3.9999.99.58 | OQS_OID_FRODO1344AES -| p521_frodo1344aes | 1.3.9999.99.57 | OQS_OID_P521_FRODO1344AES -| frodo1344shake | 1.3.9999.99.60 | OQS_OID_FRODO1344SHAKE -| p521_frodo1344shake | 1.3.9999.99.59 | OQS_OID_P521_FRODO1344SHAKE +| frodo640aes | 1.3.9999.99.58 | OQS_OID_FRODO640AES +| p256_frodo640aes | 1.3.9999.99.57 | OQS_OID_P256_FRODO640AES +| x25519_frodo640aes | 1.3.9999.99.43 | OQS_OID_X25519_FRODO640AES +| frodo640shake | 1.3.9999.99.60 | OQS_OID_FRODO640SHAKE +| p256_frodo640shake | 1.3.9999.99.59 | OQS_OID_P256_FRODO640SHAKE +| x25519_frodo640shake | 1.3.9999.99.44 | OQS_OID_X25519_FRODO640SHAKE +| frodo976aes | 1.3.9999.99.62 | OQS_OID_FRODO976AES +| p384_frodo976aes | 1.3.9999.99.61 | OQS_OID_P384_FRODO976AES +| x448_frodo976aes | 1.3.9999.99.45 | OQS_OID_X448_FRODO976AES +| frodo976shake | 1.3.9999.99.64 | OQS_OID_FRODO976SHAKE +| p384_frodo976shake | 1.3.9999.99.63 | OQS_OID_P384_FRODO976SHAKE +| x448_frodo976shake | 1.3.9999.99.46 | OQS_OID_X448_FRODO976SHAKE +| frodo1344aes | 1.3.9999.99.66 | OQS_OID_FRODO1344AES +| p521_frodo1344aes | 1.3.9999.99.65 | OQS_OID_P521_FRODO1344AES +| frodo1344shake | 1.3.9999.99.68 | OQS_OID_FRODO1344SHAKE +| p521_frodo1344shake | 1.3.9999.99.67 | OQS_OID_P521_FRODO1344SHAKE | kyber512 | 1.3.6.1.4.1.22554.5.6.1 | OQS_OID_KYBER512 | p256_kyber512 | 1.3.6.1.4.1.22554.5.7.1 | OQS_OID_P256_KYBER512 | x25519_kyber512 | 1.3.6.1.4.1.22554.5.8.1 | OQS_OID_X25519_KYBER512 | kyber768 | 1.3.6.1.4.1.22554.5.6.2 | OQS_OID_KYBER768 -| p384_kyber768 | 1.3.9999.99.61 | OQS_OID_P384_KYBER768 -| x448_kyber768 | 1.3.9999.99.42 | OQS_OID_X448_KYBER768 -| x25519_kyber768 | 1.3.9999.99.43 | OQS_OID_X25519_KYBER768 -| p256_kyber768 | 1.3.9999.99.44 | OQS_OID_P256_KYBER768 +| p384_kyber768 | 1.3.9999.99.69 | OQS_OID_P384_KYBER768 +| x448_kyber768 | 1.3.9999.99.47 | OQS_OID_X448_KYBER768 +| x25519_kyber768 | 1.3.9999.99.48 | OQS_OID_X25519_KYBER768 +| p256_kyber768 | 1.3.9999.99.49 | OQS_OID_P256_KYBER768 | kyber1024 | 1.3.6.1.4.1.22554.5.6.3 | OQS_OID_KYBER1024 -| p521_kyber1024 | 1.3.9999.99.62 | OQS_OID_P521_KYBER1024 -| bikel1 | 1.3.9999.99.64 | OQS_OID_BIKEL1 -| p256_bikel1 | 1.3.9999.99.63 | OQS_OID_P256_BIKEL1 -| x25519_bikel1 | 1.3.9999.99.45 | OQS_OID_X25519_BIKEL1 -| bikel3 | 1.3.9999.99.66 | OQS_OID_BIKEL3 -| p384_bikel3 | 1.3.9999.99.65 | OQS_OID_P384_BIKEL3 -| x448_bikel3 | 1.3.9999.99.46 | OQS_OID_X448_BIKEL3 -| bikel5 | 1.3.9999.99.68 | OQS_OID_BIKEL5 -| p521_bikel5 | 1.3.9999.99.67 | OQS_OID_P521_BIKEL5 -| hqc128 | 1.3.9999.99.70 | OQS_OID_HQC128 -| p256_hqc128 | 1.3.9999.99.69 | OQS_OID_P256_HQC128 -| x25519_hqc128 | 1.3.9999.99.47 | OQS_OID_X25519_HQC128 -| hqc192 | 1.3.9999.99.72 | OQS_OID_HQC192 -| p384_hqc192 | 1.3.9999.99.71 | OQS_OID_P384_HQC192 -| x448_hqc192 | 1.3.9999.99.48 | OQS_OID_X448_HQC192 -| hqc256 | 1.3.9999.99.74 | OQS_OID_HQC256 -| p521_hqc256 | 1.3.9999.99.73 | OQS_OID_P521_HQC256 +| p521_kyber1024 | 1.3.9999.99.70 | OQS_OID_P521_KYBER1024 +| mlkem512 | 1.3.6.1.4.1.22554.5.6.1 | OQS_OID_MLKEM512 +| p256_mlkem512 | 1.3.6.1.4.1.22554.5.7.1 | OQS_OID_P256_MLKEM512 +| x25519_mlkem512 | 1.3.6.1.4.1.22554.5.8.1 | OQS_OID_X25519_MLKEM512 +| mlkem768 | 1.3.6.1.4.1.22554.5.6.2 | OQS_OID_MLKEM768 +| p384_mlkem768 | 1.3.9999.99.71 | OQS_OID_P384_MLKEM768 +| x448_mlkem768 | 1.3.9999.99.50 | OQS_OID_X448_MLKEM768 +| x25519_mlkem768 | 1.3.9999.99.51 | OQS_OID_X25519_MLKEM768 +| p256_mlkem768 | 1.3.9999.99.52 | OQS_OID_P256_MLKEM768 +| mlkem1024 | 1.3.6.1.4.1.22554.5.6.3 | OQS_OID_MLKEM1024 +| p521_mlkem1024 | 1.3.9999.99.72 | OQS_OID_P521_MLKEM1024 +| bikel1 | 1.3.9999.99.74 | OQS_OID_BIKEL1 +| p256_bikel1 | 1.3.9999.99.73 | OQS_OID_P256_BIKEL1 +| x25519_bikel1 | 1.3.9999.99.53 | OQS_OID_X25519_BIKEL1 +| bikel3 | 1.3.9999.99.76 | OQS_OID_BIKEL3 +| p384_bikel3 | 1.3.9999.99.75 | OQS_OID_P384_BIKEL3 +| x448_bikel3 | 1.3.9999.99.54 | OQS_OID_X448_BIKEL3 +| bikel5 | 1.3.9999.99.78 | OQS_OID_BIKEL5 +| p521_bikel5 | 1.3.9999.99.77 | OQS_OID_P521_BIKEL5 +| hqc128 | 1.3.9999.99.80 | OQS_OID_HQC128 +| p256_hqc128 | 1.3.9999.99.79 | OQS_OID_P256_HQC128 +| x25519_hqc128 | 1.3.9999.99.55 | OQS_OID_X25519_HQC128 +| hqc192 | 1.3.9999.99.82 | OQS_OID_HQC192 +| p384_hqc192 | 1.3.9999.99.81 | OQS_OID_P384_HQC192 +| x448_hqc192 | 1.3.9999.99.56 | OQS_OID_X448_HQC192 +| hqc256 | 1.3.9999.99.84 | OQS_OID_HQC256 +| p521_hqc256 | 1.3.9999.99.83 | OQS_OID_P521_HQC256 # Key Encodings diff --git a/CONFIGURE.md b/CONFIGURE.md index dff28861..626513d3 100644 --- a/CONFIGURE.md +++ b/CONFIGURE.md @@ -54,10 +54,13 @@ The default value is `OFF`. ### OQS_KEM_ENCODERS -By setting this to "ON", `oqsprovider` is configured to provide encoders and decoders for -KEM algorithms both for public and private key file formats. This increases the size of -the provider but enables further use cases. -The default value is `OFF`. +By setting this to "ON", `oqsprovider` is configured to provide encoders +and decoders for KEM algorithms both for public and private key file formats. +This increases the size of the provider but enables further use cases. +The underlying OIDs are chosen at random and should not be relied on for +future use. For purposes of interoperability testing the chosen OIDs can +always --at runtime-- be set by [environment variables](https://github.com/open-quantum-safe/oqs-provider/blob/main/ALGORITHMS.md#oids) to arbitrary values +The default value therefore is `OFF`. ### OQS_PROVIDER_BUILD_STATIC diff --git a/README.md b/README.md index 534efc9c..cf504636 100644 --- a/README.md +++ b/README.md @@ -40,10 +40,12 @@ This implementation makes available the following quantum safe algorithms: - **CRYSTALS-Kyber**: `kyber512`, `p256_kyber512`, `x25519_kyber512`, `kyber768`, `p384_kyber768`, `x448_kyber768`, `x25519_kyber768`, `p256_kyber768`, `kyber1024`, `p521_kyber1024` - **FrodoKEM**: `frodo640aes`, `p256_frodo640aes`, `x25519_frodo640aes`, `frodo640shake`, `p256_frodo640shake`, `x25519_frodo640shake`, `frodo976aes`, `p384_frodo976aes`, `x448_frodo976aes`, `frodo976shake`, `p384_frodo976shake`, `x448_frodo976shake`, `frodo1344aes`, `p521_frodo1344aes`, `frodo1344shake`, `p521_frodo1344shake` - **HQC**: `hqc128`, `p256_hqc128`, `x25519_hqc128`, `hqc192`, `p384_hqc192`, `x448_hqc192`, `hqc256`, `p521_hqc256`† +- **ML-KEM**: `mlkem512`, `p256_mlkem512`, `x25519_mlkem512`, `mlkem768`, `p384_mlkem768`, `x448_mlkem768`, `x25519_mlkem768`, `p256_mlkem768`, `mlkem1024`, `p521_mlkem1024` ### Signature algorithms - **CRYSTALS-Dilithium**:`dilithium2`\*, `p256_dilithium2`\*, `rsa3072_dilithium2`\*, `dilithium2_pss2048`\*, `dilithium2_rsa2048`\*, `dilithium2_ed25519`\*, `dilithium2_p256`\*, `dilithium2_bp256`\*, `dilithium3`\*, `p384_dilithium3`\*, `dilithium3_pss3072`\*, `dilithium3_rsa3072`\*, `dilithium3_p256`\*, `dilithium3_bp256`\*, `dilithium3_ed25519`\*, `dilithium5`\*, `p521_dilithium5`\*, `dilithium5_p384`\*, `dilithium5_bp384`\*, `dilithium5_ed448`\* +- **ML-DSA**:`mldsa44`\*, `p256_mldsa44`\*, `rsa3072_mldsa44`\*, `mldsa65`\*, `p384_mldsa65`\*, `mldsa87`\*, `p521_mldsa87`\* - **Falcon**:`falcon512`\*, `p256_falcon512`\*, `rsa3072_falcon512`\*, `falcon512_p256`\*, `falcon512_bp256`\*, `falcon512_ed25519`\*, `falcon1024`\*, `p521_falcon1024`\* - **SPHINCS-SHA2**:`sphincssha2128fsimple`\*, `p256_sphincssha2128fsimple`\*, `rsa3072_sphincssha2128fsimple`\*, `sphincssha2128ssimple`\*, `p256_sphincssha2128ssimple`\*, `rsa3072_sphincssha2128ssimple`\*, `sphincssha2192fsimple`\*, `p384_sphincssha2192fsimple`\*, `sphincssha2192ssimple`, `p384_sphincssha2192ssimple`, `sphincssha2256fsimple`, `p521_sphincssha2256fsimple`, `sphincssha2256ssimple`, `p521_sphincssha2256ssimple` @@ -144,6 +146,13 @@ as documented in https://github.com/openssl/openssl/issues/22761. When https://github.com/openssl/openssl/pull/22779 land, the last config-time limitation for provider-based signatures should be gone. +A limitation present in all OpenSSL versions is the number of default groups +supported: [At most 44 default groups may be specified](https://github.com/openssl/openssl/issues/23624) +, e.g., passing to [SSL_CTX_set1_groups](https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_groups.html). +Therefore caution is advised activating all KEMs supported by `oqsprovider`: +This may lead to `openssl` crashing. + + For [general OpenSSL implementation limitations, e.g., regarding provider feature usage and support, see here](https://wiki.openssl.org/index.php/OpenSSL_3.0#STATUS_of_current_development). diff --git a/oqs-template/generate.py b/oqs-template/generate.py index 03271e8f..5888df72 100644 --- a/oqs-template/generate.py +++ b/oqs-template/generate.py @@ -38,7 +38,7 @@ def get_kem_nistlevel(alg): if alg['family'] == 'CRYSTALS-Kyber': datasheetname = 'kyber' elif alg['family'] == 'SIDH': datasheetname = 'sike' elif alg['family'] == 'NTRU-Prime': datasheetname = 'ntruprime' - else: datasheetname = alg['family'].lower() + else: datasheetname = alg['family'].lower().replace('-', '_') # load datasheet algymlfilename = os.path.join(os.environ['LIBOQS_SRC_DIR'], 'docs', 'algorithms', 'kem', '{:s}.yml'.format(datasheetname)) algyml = yaml.safe_load(file_get_contents(algymlfilename, encoding='utf-8')) @@ -53,7 +53,7 @@ def simplify(s): return False # find the variant that matches for variant in algyml['parameter-sets']: - if matches(variant['name'], alg): + if matches(variant['name'], alg) or ('alias' in variant and matches(variant['alias'], alg)): return variant['claimed-nist-level'] return None @@ -66,7 +66,7 @@ def get_sig_nistlevel(family, alg): elif family['family'] == 'SPHINCS-Haraka': datasheetname = 'sphincs' elif family['family'] == 'SPHINCS-SHA2': datasheetname = 'sphincs' elif family['family'] == 'SPHINCS-SHAKE': datasheetname = 'sphincs' - else: datasheetname = family['family'].lower() + else: datasheetname = family['family'].lower().replace('-', '_') # load datasheet algymlfilename = os.path.join(os.environ['LIBOQS_SRC_DIR'], 'docs', 'algorithms', 'sig', '{:s}.yml'.format(datasheetname)) algyml = yaml.safe_load(file_get_contents(algymlfilename, encoding='utf-8')) @@ -78,7 +78,7 @@ def simplify(s): return False # find the variant that matches for variant in algyml['parameter-sets']: - if matches(variant['name'], alg): + if matches(variant['name'], alg) or ('alias' in variant and matches(variant['alias'], alg)): return variant['claimed-nist-level'] return None diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index 78782bdb..74112ded 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -1,5 +1,5 @@ # This is the master document for ID interoperability for KEM IDs, p-hybrid KEM IDs, SIG (O)IDs -# Next free plain KEM ID: 0x0247, p-hybrid: 0x2F47, X-hybrid: 0x2FB2 +# Next free plain KEM ID: 0x024A, p-hybrid: 0x2F4A, X-hybrid: 0x2FB6 kems: - family: 'FrodoKEM' @@ -145,6 +145,41 @@ kems: hybrid_group: secp521_r1 nid: '0x2F11' oqs_alg: 'OQS_KEM_alg_kyber_1024' + - + family: 'ML-KEM' + name_group: 'mlkem512' + nid: '0x0247' + oid: '1.3.6.1.4.1.22554.5.6.1' + nid_hybrid: '0x2F47' + hybrid_oid: '1.3.6.1.4.1.22554.5.7.1' + oqs_alg: 'OQS_KEM_alg_ml_kem_512' + extra_nids: + current: + - hybrid_group: "x25519" + hybrid_oid: '1.3.6.1.4.1.22554.5.8.1' + nid: '0x2FB2' + - + family: 'ML-KEM' + name_group: 'mlkem768' + nid: '0x0248' + oid: '1.3.6.1.4.1.22554.5.6.2' + nid_hybrid: '0x2F48' + oqs_alg: 'OQS_KEM_alg_ml_kem_768' + extra_nids: + current: + - hybrid_group: "x448" + nid: '0x2FB3' + - hybrid_group: "x25519" + nid: '0x2FB4' + - hybrid_group: "p256" + nid: '0x2FB5' + - + family: 'ML-KEM' + name_group: 'mlkem1024' + nid: '0x0249' + oid: '1.3.6.1.4.1.22554.5.6.3' + nid_hybrid: '0x2F49' + oqs_alg: 'OQS_KEM_alg_ml_kem_1024' - family: 'BIKE' name_group: 'bike1l1fo' @@ -358,7 +393,7 @@ kem_nid_end: '0x0250' kem_nid_hybrid_end: '0x2FFF' # need to edit ssl_local.h macros IS_OQS_KEM_CURVEID and IS_OQS_KEM_HYBRID_CURVEID with the above _end values -# Next free signature ID: 0xfed0 +# Next free signature ID: 0xfed7 sigs: # - # iso (1) @@ -557,6 +592,46 @@ sigs: 'pretty_name': 'ECDSA p521', 'oid': '1.3.9999.2.11.4', 'code_point': '0xfead'}] + - + family: 'ML-DSA' + variants: + - + name: 'mldsa44' + pretty_name: 'ML-DSA-44' + oqs_meth: 'OQS_SIG_alg_ml_dsa_44' + oid: '1.3.6.1.4.1.2.267.12.4.4' + code_point: '0xfed0' + enable: true + mix_with: [{'name': 'p256', + 'pretty_name': 'ECDSA p256', + 'oid': '1.3.9999.7.1', + 'code_point': '0xfed3'}, + {'name': 'rsa3072', + 'pretty_name': 'RSA3072', + 'oid': '1.3.9999.7.2', + 'code_point': '0xfed4'}] + - + name: 'mldsa65' + pretty_name: 'ML-DSA-65' + oqs_meth: 'OQS_SIG_alg_ml_dsa_65' + oid: '1.3.6.1.4.1.2.267.12.6.5' + code_point: '0xfed1' + enable: true + mix_with: [{'name': 'p384', + 'pretty_name': 'ECDSA p384', + 'oid': '1.3.9999.7.3', + 'code_point': '0xfed5'}] + - + name: 'mldsa87' + pretty_name: 'ML-DSA-87' + oqs_meth: 'OQS_SIG_alg_ml_dsa_87' + oid: '1.3.6.1.4.1.2.267.12.8.7' + code_point: '0xfed2' + enable: true + mix_with: [{'name': 'p521', + 'pretty_name': 'ECDSA p521', + 'oid': '1.3.9999.7.4', + 'code_point': '0xfed6'}] - # iso (1) # identified-organization (3) diff --git a/oqs-template/generate_oid_nid_table.py b/oqs-template/generate_oid_nid_table.py index 24a0ac24..71fa98a5 100644 --- a/oqs-template/generate_oid_nid_table.py +++ b/oqs-template/generate_oid_nid_table.py @@ -47,7 +47,7 @@ def gen_sig_table(oqslibdocdir): for hybrid in variant['mix_with']: table.append([variant['name'] + ' **hybrid with** ' + hybrid['name'], liboqs_sigs[sig['family']]['spec-version'], - liboqs_sigs[sig['family']]['nist-round'], + str(liboqs_sigs[sig['family']]['nist-round']), claimed_nist_level, hybrid['code_point'], hybrid['oid']]) @@ -58,12 +58,12 @@ def gen_sig_table(oqslibdocdir): if 'extra_nids' in variant: for i in range(len(variant['extra_nids']['old'])): table.append([variant['name'], variant['extra_nids']['old'][i]['implementation_version'], - variant['extra_nids']['old'][i]['nist-round'], claimed_nist_level, variant['extra_nids']['old'][i]['code_point'], + str(variant['extra_nids']['old'][i]['nist-round']), claimed_nist_level, variant['extra_nids']['old'][i]['code_point'], variant['extra_nids']['old'][i]['oid']]) for hybrid in variant['extra_nids']['old'][i]['mix_with']: table.append([variant['name'] + ' **hybrid with** ' + hybrid['name'], variant['extra_nids']['old'][i]['implementation_version'], - variant['extra_nids']['old'][i]['nist-round'], + str(variant['extra_nids']['old'][i]['nist-round']), claimed_nist_level, hybrid['code_point'], hybrid['oid']]) @@ -114,10 +114,10 @@ def gen_kem_table(oqslibdocdir): try: table.append([kem['family'], implementation_version, - kem['name_group'], liboqs_kems[kem['family']]['nist-round'], claimed_nist_level, + kem['name_group'], str(liboqs_kems[kem['family']]['nist-round']), claimed_nist_level, kem['nid'], ""]) table.append([kem['family'], implementation_version, - kem['name_group'], liboqs_kems[kem['family']]['nist-round'], claimed_nist_level, + kem['name_group'], str(liboqs_kems[kem['family']]['nist-round']), claimed_nist_level, kem['nid_hybrid'], hybrid_elliptic_curve]) except KeyError as ke: # Non-existant NIDs mean this alg is not supported any more @@ -127,18 +127,18 @@ def gen_kem_table(oqslibdocdir): if 'current' in kem['extra_nids']: # assume "current" NIDs to mean liboqs-driven NIST round information: for entry in kem['extra_nids']['current']: table.append([kem['family'], implementation_version, - kem['name_group'], liboqs_kems[kem['family']]['nist-round'], claimed_nist_level, + kem['name_group'], str(liboqs_kems[kem['family']]['nist-round']), claimed_nist_level, entry['nid'], entry['hybrid_group'] if 'hybrid_group' in entry else ""]) if 'old' in kem['extra_nids']: for entry in kem['extra_nids']['old']: table.append([kem['family'], entry['implementation_version'], - kem['name_group'], entry['nist-round'], claimed_nist_level, + kem['name_group'], str(entry['nist-round']), claimed_nist_level, entry['nid'], entry['hybrid_group'] if 'hybrid_group' in entry else ""]) # sort by: family, version, security level, variant, hybrid - table.sort(key = lambda row: "{:s}|{:s}|{:d}|{:s}|{:s}".format(row[0], row[1], row[3], row[2], row[5])) + table.sort(key = lambda row: "{:s}|{:s}|{:s}|{:s}|{:s}".format(row[0], row[1], row[3], row[2], row[5])) table = [table_header] + table diff --git a/oqs-template/generatehelpers.py b/oqs-template/generatehelpers.py index 8da3eff0..689d37af 100644 --- a/oqs-template/generatehelpers.py +++ b/oqs-template/generatehelpers.py @@ -24,7 +24,7 @@ def get_kem_nistlevel(alg, docsdir): if alg['family'] == 'CRYSTALS-Kyber': datasheetname = 'kyber' elif alg['family'] == 'SIDH': datasheetname = 'sike' elif alg['family'] == 'NTRU-Prime': datasheetname = 'ntruprime' - else: datasheetname = alg['family'].lower() + else: datasheetname = alg['family'].lower().replace('-', '_') # load datasheet try: algymlfilename = os.path.join(docsdir, 'algorithms', 'kem', '{:s}.yml'.format(datasheetname)) @@ -44,7 +44,7 @@ def simplify(s): return False # find the variant that matches for variant in algyml['parameter-sets']: - if matches(variant['name'], alg): + if matches(variant['name'], alg) or ('alias' in variant and matches(variant['alias'], alg)): return variant['claimed-nist-level'] # Information file for algorithms no longer supported by liboqs: oldalgs = yaml.safe_load(file_get_contents(os.path.join("oqs-template", "oldalgs.yml"), encoding='utf-8')) @@ -61,7 +61,7 @@ def get_sig_nistlevel(family, alg, docsdir): elif family['family'] == 'SPHINCS-SHAKE256': datasheetname = 'sphincs' elif family['family'] == 'SPHINCS-SHA2': datasheetname = 'sphincs' elif family['family'] == 'SPHINCS-SHAKE': datasheetname = 'sphincs' - else: datasheetname = family['family'].lower() + else: datasheetname = family['family'].lower().replace('-', '_') # load datasheet algymlfilename = os.path.join(docsdir, 'algorithms', 'sig', '{:s}.yml'.format(datasheetname)) algyml = yaml.safe_load(file_get_contents(algymlfilename, encoding='utf-8')) @@ -73,7 +73,7 @@ def simplify(s): return False # find the variant that matches for variant in algyml['parameter-sets']: - if matches(variant['name'], alg): + if matches(variant['name'], alg) or ('alias' in variant and matches(variant['alias'], alg)): return variant['claimed-nist-level'] # Information file for algorithms no longer supported by liboqs: oldalgs = yaml.safe_load(file_get_contents(os.path.join("oqs-template", "oldalgs.yml"), encoding='utf-8')) diff --git a/oqs-template/oqs-kem-info.md b/oqs-template/oqs-kem-info.md index d85fca20..66ba2326 100644 --- a/oqs-template/oqs-kem-info.md +++ b/oqs-template/oqs-kem-info.md @@ -1,87 +1,97 @@ -| Family | Implementation Version | Variant | NIST round | Claimed NIST Level | Code Point | Hybrid Elliptic Curve (if any) | -|:---------------|:-------------------------|:---------------|-------------:|---------------------:|:-------------|:---------------------------------| -| BIKE | 5.1 | bikel1 | 4 | 1 | 0x0241 | | -| BIKE | 5.1 | bikel1 | 4 | 1 | 0x2F41 | secp256_r1 | -| BIKE | 5.1 | bikel1 | 4 | 1 | 0x2FAE | x25519 | -| BIKE | 5.1 | bikel3 | 4 | 3 | 0x0242 | | -| BIKE | 5.1 | bikel3 | 4 | 3 | 0x2F42 | secp384_r1 | -| BIKE | 5.1 | bikel3 | 4 | 3 | 0x2FAF | x448 | -| BIKE | 5.1 | bikel5 | 4 | 5 | 0x0243 | | -| BIKE | 5.1 | bikel5 | 4 | 5 | 0x2F43 | secp521_r1 | -| BIKE | NIST Round 2 submission | bike1l1cpa | 2 | 1 | 0x0206 | | -| BIKE | NIST Round 2 submission | bike1l1cpa | 2 | 1 | 0x2F06 | secp256_r1 | -| BIKE | NIST Round 2 submission | bike1l1fo | 2 | 1 | 0x0223 | | -| BIKE | NIST Round 2 submission | bike1l1fo | 2 | 1 | 0x2F23 | secp256_r1 | -| BIKE | NIST Round 2 submission | bike1l1fo | 2 | 1 | 0x2F28 | x25519 | -| BIKE | NIST Round 2 submission | bike1l3cpa | 2 | 3 | 0x0207 | | -| BIKE | NIST Round 2 submission | bike1l3cpa | 2 | 3 | 0x2F07 | secp384_r1 | -| BIKE | NIST Round 2 submission | bike1l3fo | 2 | 3 | 0x0224 | | -| BIKE | NIST Round 2 submission | bike1l3fo | 2 | 3 | 0x2F24 | secp384_r1 | -| BIKE | NIST Round 3 submission | bikel1 | 3 | 1 | 0x0238 | | -| BIKE | NIST Round 3 submission | bikel1 | 3 | 1 | 0x2F37 | x25519 | -| BIKE | NIST Round 3 submission | bikel1 | 3 | 1 | 0x2F38 | secp256_r1 | -| BIKE | NIST Round 3 submission | bikel3 | 3 | 3 | 0x023B | | -| BIKE | NIST Round 3 submission | bikel3 | 3 | 3 | 0x2F3B | secp384_r1 | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber1024 | 2 | 5 | 0x0211 | | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber1024 | 2 | 5 | 0x2F11 | secp521_r1 | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 2 | 1 | 0x020F | | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 2 | 1 | 0x2F0F | secp256_r1 | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 2 | 1 | 0x2F26 | x25519 | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber768 | 2 | 3 | 0x0210 | | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber768 | 2 | 3 | 0x2F10 | secp384_r1 | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s1024 | 2 | 5 | 0x022B | | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s1024 | 2 | 5 | 0x2F2B | secp521_r1 | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s512 | 2 | 1 | 0x0229 | | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s512 | 2 | 1 | 0x2F29 | secp256_r1 | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s768 | 2 | 3 | 0x022A | | -| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s768 | 2 | 3 | 0x2F2A | secp384_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 3 | 5 | 0x023D | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 3 | 5 | 0x2F3D | secp521_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 3 | 1 | 0x023A | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 3 | 1 | 0x2F39 | x25519 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 3 | 1 | 0x2F3A | secp256_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 3 | 0x023C | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 3 | 0x2F3C | secp384_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 3 | 0x2F90 | x448 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 3 | 0x6399 | x25519 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 3 | 0x639A | p256 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 3 | 5 | 0x0240 | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 3 | 5 | 0x2F40 | secp521_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 3 | 1 | 0x023E | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 3 | 1 | 0x2F3E | secp256_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 3 | 1 | 0x2FA9 | x25519 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 3 | 0x023F | | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 3 | 0x2F3F | secp384_r1 | -| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 3 | 0x2FAA | x448 | -| FrodoKEM | NIST Round 3 submission | frodo1344aes | 3 | 5 | 0x0204 | | -| FrodoKEM | NIST Round 3 submission | frodo1344aes | 3 | 5 | 0x2F04 | secp521_r1 | -| FrodoKEM | NIST Round 3 submission | frodo1344shake | 3 | 5 | 0x0205 | | -| FrodoKEM | NIST Round 3 submission | frodo1344shake | 3 | 5 | 0x2F05 | secp521_r1 | -| FrodoKEM | NIST Round 3 submission | frodo640aes | 3 | 1 | 0x0200 | | -| FrodoKEM | NIST Round 3 submission | frodo640aes | 3 | 1 | 0x2F00 | secp256_r1 | -| FrodoKEM | NIST Round 3 submission | frodo640aes | 3 | 1 | 0x2F80 | x25519 | -| FrodoKEM | NIST Round 3 submission | frodo640shake | 3 | 1 | 0x0201 | | -| FrodoKEM | NIST Round 3 submission | frodo640shake | 3 | 1 | 0x2F01 | secp256_r1 | -| FrodoKEM | NIST Round 3 submission | frodo640shake | 3 | 1 | 0x2F81 | x25519 | -| FrodoKEM | NIST Round 3 submission | frodo976aes | 3 | 3 | 0x0202 | | -| FrodoKEM | NIST Round 3 submission | frodo976aes | 3 | 3 | 0x2F02 | secp384_r1 | -| FrodoKEM | NIST Round 3 submission | frodo976aes | 3 | 3 | 0x2F82 | x448 | -| FrodoKEM | NIST Round 3 submission | frodo976shake | 3 | 3 | 0x0203 | | -| FrodoKEM | NIST Round 3 submission | frodo976shake | 3 | 3 | 0x2F03 | secp384_r1 | -| FrodoKEM | NIST Round 3 submission | frodo976shake | 3 | 3 | 0x2F83 | x448 | -| HQC | NIST Round 3 submission | hqc128 | 3 | 1 | 0x022C | | -| HQC | NIST Round 3 submission | hqc128 | 3 | 1 | 0x2F2C | secp256_r1 | -| HQC | NIST Round 3 submission | hqc128 | 3 | 1 | 0x2FAC | x25519 | -| HQC | NIST Round 3 submission | hqc192 | 3 | 3 | 0x022D | | -| HQC | NIST Round 3 submission | hqc192 | 3 | 3 | 0x2F2D | secp384_r1 | -| HQC | NIST Round 3 submission | hqc192 | 3 | 3 | 0x2FAD | x448 | -| HQC | NIST Round 3 submission | hqc256 | 3 | 5 | 0x022E | | -| HQC | NIST Round 3 submission | hqc256 | 3 | 5 | 0x2F2E | secp521_r1 | -| HQC | 2023-04-30 | hqc128 | 4 | 1 | 0x0244 | | -| HQC | 2023-04-30 | hqc128 | 4 | 1 | 0x2F44 | secp256_r1 | -| HQC | 2023-04-30 | hqc128 | 4 | 1 | 0x2FB0 | x25519 | -| HQC | 2023-04-30 | hqc192 | 4 | 3 | 0x0245 | | -| HQC | 2023-04-30 | hqc192 | 4 | 3 | 0x2F45 | secp384_r1 | -| HQC | 2023-04-30 | hqc192 | 4 | 3 | 0x2FB1 | x448 | -| HQC | 2023-04-30 | hqc256 | 4 | 5 | 0x0246 | | -| HQC | 2023-04-30 | hqc256 | 4 | 5 | 0x2F46 | secp521_r1 | +| Family | Implementation Version | Variant | NIST round | Claimed NIST Level | Code Point | Hybrid Elliptic Curve (if any) | +|:---------------|:-------------------------|:---------------|:-------------|---------------------:|:-------------|:---------------------------------| +| BIKE | 5.1 | bikel1 | 4 | 1 | 0x0241 | | +| BIKE | 5.1 | bikel1 | 4 | 1 | 0x2F41 | secp256_r1 | +| BIKE | 5.1 | bikel1 | 4 | 1 | 0x2FAE | x25519 | +| BIKE | 5.1 | bikel3 | 4 | 3 | 0x0242 | | +| BIKE | 5.1 | bikel3 | 4 | 3 | 0x2F42 | secp384_r1 | +| BIKE | 5.1 | bikel3 | 4 | 3 | 0x2FAF | x448 | +| BIKE | 5.1 | bikel5 | 4 | 5 | 0x0243 | | +| BIKE | 5.1 | bikel5 | 4 | 5 | 0x2F43 | secp521_r1 | +| BIKE | NIST Round 2 submission | bike1l1cpa | 2 | 1 | 0x0206 | | +| BIKE | NIST Round 2 submission | bike1l1cpa | 2 | 1 | 0x2F06 | secp256_r1 | +| BIKE | NIST Round 2 submission | bike1l1fo | 2 | 1 | 0x0223 | | +| BIKE | NIST Round 2 submission | bike1l1fo | 2 | 1 | 0x2F23 | secp256_r1 | +| BIKE | NIST Round 2 submission | bike1l1fo | 2 | 1 | 0x2F28 | x25519 | +| BIKE | NIST Round 2 submission | bike1l3cpa | 2 | 3 | 0x0207 | | +| BIKE | NIST Round 2 submission | bike1l3cpa | 2 | 3 | 0x2F07 | secp384_r1 | +| BIKE | NIST Round 2 submission | bike1l3fo | 2 | 3 | 0x0224 | | +| BIKE | NIST Round 2 submission | bike1l3fo | 2 | 3 | 0x2F24 | secp384_r1 | +| BIKE | NIST Round 3 submission | bikel1 | 3 | 1 | 0x0238 | | +| BIKE | NIST Round 3 submission | bikel1 | 3 | 1 | 0x2F37 | x25519 | +| BIKE | NIST Round 3 submission | bikel1 | 3 | 1 | 0x2F38 | secp256_r1 | +| BIKE | NIST Round 3 submission | bikel3 | 3 | 3 | 0x023B | | +| BIKE | NIST Round 3 submission | bikel3 | 3 | 3 | 0x2F3B | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber1024 | 2 | 5 | 0x0211 | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber1024 | 2 | 5 | 0x2F11 | secp521_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 2 | 1 | 0x020F | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 2 | 1 | 0x2F0F | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber512 | 2 | 1 | 0x2F26 | x25519 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber768 | 2 | 3 | 0x0210 | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber768 | 2 | 3 | 0x2F10 | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s1024 | 2 | 5 | 0x022B | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s1024 | 2 | 5 | 0x2F2B | secp521_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s512 | 2 | 1 | 0x0229 | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s512 | 2 | 1 | 0x2F29 | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s768 | 2 | 3 | 0x022A | | +| CRYSTALS-Kyber | NIST Round 2 submission | kyber90s768 | 2 | 3 | 0x2F2A | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 3 | 5 | 0x023D | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber1024 | 3 | 5 | 0x2F3D | secp521_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 3 | 1 | 0x023A | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 3 | 1 | 0x2F39 | x25519 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber512 | 3 | 1 | 0x2F3A | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 3 | 0x023C | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 3 | 0x2F3C | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 3 | 0x2F90 | x448 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 3 | 0x6399 | x25519 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber768 | 3 | 3 | 0x639A | p256 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 3 | 5 | 0x0240 | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s1024 | 3 | 5 | 0x2F40 | secp521_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 3 | 1 | 0x023E | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 3 | 1 | 0x2F3E | secp256_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s512 | 3 | 1 | 0x2FA9 | x25519 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 3 | 0x023F | | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 3 | 0x2F3F | secp384_r1 | +| CRYSTALS-Kyber | NIST Round 3 submission | kyber90s768 | 3 | 3 | 0x2FAA | x448 | +| FrodoKEM | NIST Round 3 submission | frodo1344aes | 3 | 5 | 0x0204 | | +| FrodoKEM | NIST Round 3 submission | frodo1344aes | 3 | 5 | 0x2F04 | secp521_r1 | +| FrodoKEM | NIST Round 3 submission | frodo1344shake | 3 | 5 | 0x0205 | | +| FrodoKEM | NIST Round 3 submission | frodo1344shake | 3 | 5 | 0x2F05 | secp521_r1 | +| FrodoKEM | NIST Round 3 submission | frodo640aes | 3 | 1 | 0x0200 | | +| FrodoKEM | NIST Round 3 submission | frodo640aes | 3 | 1 | 0x2F00 | secp256_r1 | +| FrodoKEM | NIST Round 3 submission | frodo640aes | 3 | 1 | 0x2F80 | x25519 | +| FrodoKEM | NIST Round 3 submission | frodo640shake | 3 | 1 | 0x0201 | | +| FrodoKEM | NIST Round 3 submission | frodo640shake | 3 | 1 | 0x2F01 | secp256_r1 | +| FrodoKEM | NIST Round 3 submission | frodo640shake | 3 | 1 | 0x2F81 | x25519 | +| FrodoKEM | NIST Round 3 submission | frodo976aes | 3 | 3 | 0x0202 | | +| FrodoKEM | NIST Round 3 submission | frodo976aes | 3 | 3 | 0x2F02 | secp384_r1 | +| FrodoKEM | NIST Round 3 submission | frodo976aes | 3 | 3 | 0x2F82 | x448 | +| FrodoKEM | NIST Round 3 submission | frodo976shake | 3 | 3 | 0x0203 | | +| FrodoKEM | NIST Round 3 submission | frodo976shake | 3 | 3 | 0x2F03 | secp384_r1 | +| FrodoKEM | NIST Round 3 submission | frodo976shake | 3 | 3 | 0x2F83 | x448 | +| HQC | NIST Round 3 submission | hqc128 | 3 | 1 | 0x022C | | +| HQC | NIST Round 3 submission | hqc128 | 3 | 1 | 0x2F2C | secp256_r1 | +| HQC | NIST Round 3 submission | hqc128 | 3 | 1 | 0x2FAC | x25519 | +| HQC | NIST Round 3 submission | hqc192 | 3 | 3 | 0x022D | | +| HQC | NIST Round 3 submission | hqc192 | 3 | 3 | 0x2F2D | secp384_r1 | +| HQC | NIST Round 3 submission | hqc192 | 3 | 3 | 0x2FAD | x448 | +| HQC | NIST Round 3 submission | hqc256 | 3 | 5 | 0x022E | | +| HQC | NIST Round 3 submission | hqc256 | 3 | 5 | 0x2F2E | secp521_r1 | +| HQC | 2023-04-30 | hqc128 | 4 | 1 | 0x0244 | | +| HQC | 2023-04-30 | hqc128 | 4 | 1 | 0x2F44 | secp256_r1 | +| HQC | 2023-04-30 | hqc128 | 4 | 1 | 0x2FB0 | x25519 | +| HQC | 2023-04-30 | hqc192 | 4 | 3 | 0x0245 | | +| HQC | 2023-04-30 | hqc192 | 4 | 3 | 0x2F45 | secp384_r1 | +| HQC | 2023-04-30 | hqc192 | 4 | 3 | 0x2FB1 | x448 | +| HQC | 2023-04-30 | hqc256 | 4 | 5 | 0x0246 | | +| HQC | 2023-04-30 | hqc256 | 4 | 5 | 0x2F46 | secp521_r1 | +| ML-KEM | ML-KEM-ipd | mlkem1024 | ipd | 5 | 0x0249 | | +| ML-KEM | ML-KEM-ipd | mlkem1024 | ipd | 5 | 0x2F49 | secp521_r1 | +| ML-KEM | ML-KEM-ipd | mlkem512 | ipd | 1 | 0x0247 | | +| ML-KEM | ML-KEM-ipd | mlkem512 | ipd | 1 | 0x2F47 | secp256_r1 | +| ML-KEM | ML-KEM-ipd | mlkem512 | ipd | 1 | 0x2FB2 | x25519 | +| ML-KEM | ML-KEM-ipd | mlkem768 | ipd | 3 | 0x0248 | | +| ML-KEM | ML-KEM-ipd | mlkem768 | ipd | 3 | 0x2F48 | secp384_r1 | +| ML-KEM | ML-KEM-ipd | mlkem768 | ipd | 3 | 0x2FB3 | x448 | +| ML-KEM | ML-KEM-ipd | mlkem768 | ipd | 3 | 0x2FB4 | x25519 | +| ML-KEM | ML-KEM-ipd | mlkem768 | ipd | 3 | 0x2FB5 | p256 | diff --git a/oqs-template/oqs-sig-info.md b/oqs-template/oqs-sig-info.md index 9f084982..15607003 100644 --- a/oqs-template/oqs-sig-info.md +++ b/oqs-template/oqs-sig-info.md @@ -1,138 +1,145 @@ -| Algorithm | Implementation Version | NIST round | Claimed NIST Level | Code Point | OID | -|:--------------------------------------------------|:----------------------------------------------|-------------:|---------------------:|:-------------|:-------------------------| -| dilithium2 | 3.1 | 3 | 2 | 0xfea0 | 1.3.6.1.4.1.2.267.7.4.4 | -| dilithium2 **hybrid with** p256 | 3.1 | 3 | 2 | 0xfea1 | 1.3.9999.2.7.1 | -| dilithium2 **hybrid with** rsa3072 | 3.1 | 3 | 2 | 0xfea2 | 1.3.9999.2.7.2 | -| dilithium3 | 3.1 | 3 | 3 | 0xfea3 | 1.3.6.1.4.1.2.267.7.6.5 | -| dilithium3 **hybrid with** p384 | 3.1 | 3 | 3 | 0xfea4 | 1.3.9999.2.7.3 | -| dilithium5 | 3.1 | 3 | 5 | 0xfea5 | 1.3.6.1.4.1.2.267.7.8.7 | -| dilithium5 **hybrid with** p521 | 3.1 | 3 | 5 | 0xfea6 | 1.3.9999.2.7.4 | -| dilithium2_aes | NIST Round 3 submission | 3 | 2 | 0xfea7 | 1.3.6.1.4.1.2.267.11.4.4 | -| dilithium2_aes **hybrid with** p256 | NIST Round 3 submission | 3 | 2 | 0xfea8 | 1.3.9999.2.11.1 | -| dilithium2_aes **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 2 | 0xfea9 | 1.3.9999.2.11.2 | -| dilithium3_aes | NIST Round 3 submission | 3 | 3 | 0xfeaa | 1.3.6.1.4.1.2.267.11.6.5 | -| dilithium3_aes **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfeab | 1.3.9999.2.11.3 | -| dilithium5_aes | NIST Round 3 submission | 3 | 5 | 0xfeac | 1.3.6.1.4.1.2.267.11.8.7 | -| dilithium5_aes **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfead | 1.3.9999.2.11.4 | -| falcon512 | 20211101 | 3 | 1 | 0xfeae | 1.3.9999.3.6 | -| falcon512 **hybrid with** p256 | 20211101 | 3 | 1 | 0xfeaf | 1.3.9999.3.7 | -| falcon512 **hybrid with** rsa3072 | 20211101 | 3 | 1 | 0xfeb0 | 1.3.9999.3.8 | -| falcon512 | NIST Round 3 submission | 3 | 1 | 0xfe0b | 1.3.9999.3.1 | -| falcon512 **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe0c | 1.3.9999.3.2 | -| falcon512 **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe0d | 1.3.9999.3.3 | -| falcon1024 | 20211101 | 3 | 5 | 0xfeb1 | 1.3.9999.3.9 | -| falcon1024 **hybrid with** p521 | 20211101 | 3 | 5 | 0xfeb2 | 1.3.9999.3.10 | -| falcon1024 | NIST Round 3 submission | 3 | 5 | 0xfe0e | 1.3.9999.3.4 | -| falcon1024 **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe0f | 1.3.9999.3.5 | -| sphincsharaka128frobust | NIST Round 3 submission | 3 | 1 | 0xfe42 | 1.3.9999.6.1.1 | -| sphincsharaka128frobust **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe43 | 1.3.9999.6.1.2 | -| sphincsharaka128frobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe44 | 1.3.9999.6.1.3 | -| sphincsharaka128fsimple | NIST Round 3 submission | 3 | 1 | 0xfe45 | 1.3.9999.6.1.4 | -| sphincsharaka128fsimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe46 | 1.3.9999.6.1.5 | -| sphincsharaka128fsimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe47 | 1.3.9999.6.1.6 | -| sphincsharaka128srobust | NIST Round 3 submission | 3 | 1 | 0xfe48 | 1.3.9999.6.1.7 | -| sphincsharaka128srobust **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe49 | 1.3.9999.6.1.8 | -| sphincsharaka128srobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe4a | 1.3.9999.6.1.9 | -| sphincsharaka128ssimple | NIST Round 3 submission | 3 | 1 | 0xfe4b | 1.3.9999.6.1.10 | -| sphincsharaka128ssimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe4c | 1.3.9999.6.1.11 | -| sphincsharaka128ssimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe4d | 1.3.9999.6.1.12 | -| sphincsharaka192frobust | NIST Round 3 submission | 3 | 3 | 0xfe4e | 1.3.9999.6.2.1 | -| sphincsharaka192frobust **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe4f | 1.3.9999.6.2.2 | -| sphincsharaka192fsimple | NIST Round 3 submission | 3 | 3 | 0xfe50 | 1.3.9999.6.2.3 | -| sphincsharaka192fsimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe51 | 1.3.9999.6.2.4 | -| sphincsharaka192srobust | NIST Round 3 submission | 3 | 3 | 0xfe52 | 1.3.9999.6.2.5 | -| sphincsharaka192srobust **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe53 | 1.3.9999.6.2.6 | -| sphincsharaka192ssimple | NIST Round 3 submission | 3 | 3 | 0xfe54 | 1.3.9999.6.2.7 | -| sphincsharaka192ssimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe55 | 1.3.9999.6.2.8 | -| sphincsharaka256frobust | NIST Round 3 submission | 3 | 3 | 0xfe56 | 1.3.9999.6.3.1 | -| sphincsharaka256frobust **hybrid with** p521 | NIST Round 3 submission | 3 | 3 | 0xfe57 | 1.3.9999.6.3.2 | -| sphincsharaka256fsimple | NIST Round 3 submission | 3 | 5 | 0xfe58 | 1.3.9999.6.3.3 | -| sphincsharaka256fsimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe59 | 1.3.9999.6.3.4 | -| sphincsharaka256srobust | NIST Round 3 submission | 3 | 5 | 0xfe5a | 1.3.9999.6.3.5 | -| sphincsharaka256srobust **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe5b | 1.3.9999.6.3.6 | -| sphincsharaka256ssimple | NIST Round 3 submission | 3 | 5 | 0xfe5c | 1.3.9999.6.3.7 | -| sphincsharaka256ssimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe5d | 1.3.9999.6.3.8 | -| sphincssha26128frobust | NIST Round 3 submission | 3 | 5 | 0xfe5e | 1.3.9999.6.4.1 | -| sphincssha26128frobust **hybrid with** p256 | NIST Round 3 submission | 3 | 5 | 0xfe5f | 1.3.9999.6.4.2 | -| sphincssha26128frobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 5 | 0xfe60 | 1.3.9999.6.4.3 | -| sphincssha2128fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb3 | 1.3.9999.6.4.13 | -| sphincssha2128fsimple **hybrid with** p256 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb4 | 1.3.9999.6.4.14 | -| sphincssha2128fsimple **hybrid with** rsa3072 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb5 | 1.3.9999.6.4.15 | -| sphincssha2128fsimple | NIST Round 3 submission | 3 | 1 | 0xfe61 | 1.3.9999.6.4.4 | -| sphincssha2128fsimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe62 | 1.3.9999.6.4.5 | -| sphincssha2128fsimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe63 | 1.3.9999.6.4.6 | -| sphincssha256128srobust | NIST Round 3 submission | 3 | 5 | 0xfe64 | 1.3.9999.6.4.7 | -| sphincssha256128srobust **hybrid with** p256 | NIST Round 3 submission | 3 | 5 | 0xfe65 | 1.3.9999.6.4.8 | -| sphincssha256128srobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 5 | 0xfe66 | 1.3.9999.6.4.9 | -| sphincssha2128ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb6 | 1.3.9999.6.4.16 | -| sphincssha2128ssimple **hybrid with** p256 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb7 | 1.3.9999.6.4.17 | -| sphincssha2128ssimple **hybrid with** rsa3072 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb8 | 1.3.9999.6.4.18 | -| sphincssha2128ssimple | NIST Round 3 submission | 3 | 1 | 0xfe67 | 1.3.9999.6.4.10 | -| sphincssha2128ssimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe68 | 1.3.9999.6.4.11 | -| sphincssha2128ssimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe69 | 1.3.9999.6.4.12 | -| sphincssha256192frobust | NIST Round 3 submission | 3 | 5 | 0xfe6a | 1.3.9999.6.5.1 | -| sphincssha256192frobust **hybrid with** p384 | NIST Round 3 submission | 3 | 5 | 0xfe6b | 1.3.9999.6.5.2 | -| sphincssha2192fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfeb9 | 1.3.9999.6.5.10 | -| sphincssha2192fsimple **hybrid with** p384 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfeba | 1.3.9999.6.5.11 | -| sphincssha2192fsimple | NIST Round 3 submission | 3 | 3 | 0xfe6c | 1.3.9999.6.5.3 | -| sphincssha2192fsimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe6d | 1.3.9999.6.5.4 | -| sphincssha256192srobust | NIST Round 3 submission | 3 | 5 | 0xfe6e | 1.3.9999.6.5.5 | -| sphincssha256192srobust **hybrid with** p384 | NIST Round 3 submission | 3 | 5 | 0xfe6f | 1.3.9999.6.5.6 | -| sphincssha2192ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfebb | 1.3.9999.6.5.12 | -| sphincssha2192ssimple **hybrid with** p384 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfebc | 1.3.9999.6.5.13 | -| sphincssha2192ssimple | NIST Round 3 submission | 3 | 3 | 0xfe70 | 1.3.9999.6.5.7 | -| sphincssha2192ssimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe71 | 1.3.9999.6.5.8 | -| sphincssha256256frobust | NIST Round 3 submission | 3 | 5 | 0xfe72 | 1.3.9999.6.6.1 | -| sphincssha256256frobust **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe73 | 1.3.9999.6.6.2 | -| sphincssha2256fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfebd | 1.3.9999.6.6.10 | -| sphincssha2256fsimple **hybrid with** p521 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfebe | 1.3.9999.6.6.11 | -| sphincssha2256fsimple | NIST Round 3 submission | 3 | 5 | 0xfe74 | 1.3.9999.6.6.3 | -| sphincssha2256fsimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe75 | 1.3.9999.6.6.4 | -| sphincssha256256srobust | NIST Round 3 submission | 3 | 5 | 0xfe76 | 1.3.9999.6.6.5 | -| sphincssha256256srobust **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe77 | 1.3.9999.6.6.6 | -| sphincssha2256ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfec0 | 1.3.9999.6.6.12 | -| sphincssha2256ssimple **hybrid with** p521 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfec1 | 1.3.9999.6.6.13 | -| sphincssha2256ssimple | NIST Round 3 submission | 3 | 5 | 0xfe78 | 1.3.9999.6.6.7 | -| sphincssha2256ssimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe79 | 1.3.9999.6.6.8 | -| sphincsshake256128frobust | NIST Round 3 submission | 3 | 1 | 0xfe7a | 1.3.9999.6.7.1 | -| sphincsshake256128frobust **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe7b | 1.3.9999.6.7.2 | -| sphincsshake256128frobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe7c | 1.3.9999.6.7.3 | -| sphincsshake128fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec2 | 1.3.9999.6.7.13 | -| sphincsshake128fsimple **hybrid with** p256 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec3 | 1.3.9999.6.7.14 | -| sphincsshake128fsimple **hybrid with** rsa3072 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec4 | 1.3.9999.6.7.15 | -| sphincsshake128fsimple | NIST Round 3 submission | 3 | 1 | 0xfe7d | 1.3.9999.6.7.4 | -| sphincsshake128fsimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe7e | 1.3.9999.6.7.5 | -| sphincsshake128fsimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe7f | 1.3.9999.6.7.6 | -| sphincsshake256128srobust | NIST Round 3 submission | 3 | 1 | 0xfe80 | 1.3.9999.6.7.7 | -| sphincsshake256128srobust **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe81 | 1.3.9999.6.7.8 | -| sphincsshake256128srobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe82 | 1.3.9999.6.7.9 | -| sphincsshake128ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec5 | 1.3.9999.6.7.16 | -| sphincsshake128ssimple **hybrid with** p256 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec6 | 1.3.9999.6.7.17 | -| sphincsshake128ssimple **hybrid with** rsa3072 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec7 | 1.3.9999.6.7.18 | -| sphincsshake128ssimple | NIST Round 3 submission | 3 | 1 | 0xfe83 | 1.3.9999.6.7.10 | -| sphincsshake128ssimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe84 | 1.3.9999.6.7.11 | -| sphincsshake128ssimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe85 | 1.3.9999.6.7.12 | -| sphincsshake256192frobust | NIST Round 3 submission | 3 | 3 | 0xfe86 | 1.3.9999.6.8.1 | -| sphincsshake256192frobust **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe87 | 1.3.9999.6.8.2 | -| sphincsshake192fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfec8 | 1.3.9999.6.8.10 | -| sphincsshake192fsimple **hybrid with** p384 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfec9 | 1.3.9999.6.8.11 | -| sphincsshake192fsimple | NIST Round 3 submission | 3 | 3 | 0xfe88 | 1.3.9999.6.8.3 | -| sphincsshake192fsimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe89 | 1.3.9999.6.8.4 | -| sphincsshake256192srobust | NIST Round 3 submission | 3 | 3 | 0xfe8a | 1.3.9999.6.8.5 | -| sphincsshake256192srobust **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe8b | 1.3.9999.6.8.6 | -| sphincsshake192ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfeca | 1.3.9999.6.8.12 | -| sphincsshake192ssimple **hybrid with** p384 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfecb | 1.3.9999.6.8.13 | -| sphincsshake192ssimple | NIST Round 3 submission | 3 | 3 | 0xfe8c | 1.3.9999.6.8.7 | -| sphincsshake192ssimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe8d | 1.3.9999.6.8.8 | -| sphincsshake256256frobust | NIST Round 3 submission | 3 | 5 | 0xfe8e | 1.3.9999.6.9.1 | -| sphincsshake256256frobust **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe8f | 1.3.9999.6.9.2 | -| sphincsshake256fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfecc | 1.3.9999.6.9.10 | -| sphincsshake256fsimple **hybrid with** p521 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfecd | 1.3.9999.6.9.11 | -| sphincsshake256fsimple | NIST Round 3 submission | 3 | 5 | 0xfe90 | 1.3.9999.6.9.3 | -| sphincsshake256fsimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe91 | 1.3.9999.6.9.4 | -| sphincsshake256256srobust | NIST Round 3 submission | 3 | 5 | 0xfe92 | 1.3.9999.6.9.5 | -| sphincsshake256256srobust **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe93 | 1.3.9999.6.9.6 | -| sphincsshake256ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfece | 1.3.9999.6.9.12 | -| sphincsshake256ssimple **hybrid with** p521 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfecf | 1.3.9999.6.9.13 | -| sphincsshake256ssimple | NIST Round 3 submission | 3 | 5 | 0xfe94 | 1.3.9999.6.9.7 | -| sphincsshake256ssimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe95 | 1.3.9999.6.9.8 | \ No newline at end of file +| Algorithm | Implementation Version | NIST round | Claimed NIST Level | Code Point | OID | +|:--------------------------------------------------|:----------------------------------------------|:-------------|---------------------:|:-------------|:-------------------------| +| dilithium2 | 3.1 | 3 | 2 | 0xfea0 | 1.3.6.1.4.1.2.267.7.4.4 | +| dilithium2 **hybrid with** p256 | 3.1 | 3 | 2 | 0xfea1 | 1.3.9999.2.7.1 | +| dilithium2 **hybrid with** rsa3072 | 3.1 | 3 | 2 | 0xfea2 | 1.3.9999.2.7.2 | +| dilithium3 | 3.1 | 3 | 3 | 0xfea3 | 1.3.6.1.4.1.2.267.7.6.5 | +| dilithium3 **hybrid with** p384 | 3.1 | 3 | 3 | 0xfea4 | 1.3.9999.2.7.3 | +| dilithium5 | 3.1 | 3 | 5 | 0xfea5 | 1.3.6.1.4.1.2.267.7.8.7 | +| dilithium5 **hybrid with** p521 | 3.1 | 3 | 5 | 0xfea6 | 1.3.9999.2.7.4 | +| dilithium2_aes | NIST Round 3 submission | 3 | 2 | 0xfea7 | 1.3.6.1.4.1.2.267.11.4.4 | +| dilithium2_aes **hybrid with** p256 | NIST Round 3 submission | 3 | 2 | 0xfea8 | 1.3.9999.2.11.1 | +| dilithium2_aes **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 2 | 0xfea9 | 1.3.9999.2.11.2 | +| dilithium3_aes | NIST Round 3 submission | 3 | 3 | 0xfeaa | 1.3.6.1.4.1.2.267.11.6.5 | +| dilithium3_aes **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfeab | 1.3.9999.2.11.3 | +| dilithium5_aes | NIST Round 3 submission | 3 | 5 | 0xfeac | 1.3.6.1.4.1.2.267.11.8.7 | +| dilithium5_aes **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfead | 1.3.9999.2.11.4 | +| falcon512 | 20211101 | 3 | 1 | 0xfeae | 1.3.9999.3.6 | +| falcon512 **hybrid with** p256 | 20211101 | 3 | 1 | 0xfeaf | 1.3.9999.3.7 | +| falcon512 **hybrid with** rsa3072 | 20211101 | 3 | 1 | 0xfeb0 | 1.3.9999.3.8 | +| falcon512 | NIST Round 3 submission | 3 | 1 | 0xfe0b | 1.3.9999.3.1 | +| falcon512 **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe0c | 1.3.9999.3.2 | +| falcon512 **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe0d | 1.3.9999.3.3 | +| falcon1024 | 20211101 | 3 | 5 | 0xfeb1 | 1.3.9999.3.9 | +| falcon1024 **hybrid with** p521 | 20211101 | 3 | 5 | 0xfeb2 | 1.3.9999.3.10 | +| falcon1024 | NIST Round 3 submission | 3 | 5 | 0xfe0e | 1.3.9999.3.4 | +| falcon1024 **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe0f | 1.3.9999.3.5 | +| mldsa44 | ML-DSA-ipd | ipd | 1 | 0xfed0 | 1.3.6.1.4.1.2.267.12.4.4 | +| mldsa44 **hybrid with** p256 | ML-DSA-ipd | ipd | 1 | 0xfed3 | 1.3.9999.7.1 | +| mldsa44 **hybrid with** rsa3072 | ML-DSA-ipd | ipd | 1 | 0xfed4 | 1.3.9999.7.2 | +| mldsa65 | ML-DSA-ipd | ipd | 3 | 0xfed1 | 1.3.6.1.4.1.2.267.12.6.5 | +| mldsa65 **hybrid with** p384 | ML-DSA-ipd | ipd | 3 | 0xfed5 | 1.3.9999.7.3 | +| mldsa87 | ML-DSA-ipd | ipd | 5 | 0xfed2 | 1.3.6.1.4.1.2.267.12.8.7 | +| mldsa87 **hybrid with** p521 | ML-DSA-ipd | ipd | 5 | 0xfed6 | 1.3.9999.7.4 | +| sphincsharaka128frobust | NIST Round 3 submission | 3 | 1 | 0xfe42 | 1.3.9999.6.1.1 | +| sphincsharaka128frobust **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe43 | 1.3.9999.6.1.2 | +| sphincsharaka128frobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe44 | 1.3.9999.6.1.3 | +| sphincsharaka128fsimple | NIST Round 3 submission | 3 | 1 | 0xfe45 | 1.3.9999.6.1.4 | +| sphincsharaka128fsimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe46 | 1.3.9999.6.1.5 | +| sphincsharaka128fsimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe47 | 1.3.9999.6.1.6 | +| sphincsharaka128srobust | NIST Round 3 submission | 3 | 1 | 0xfe48 | 1.3.9999.6.1.7 | +| sphincsharaka128srobust **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe49 | 1.3.9999.6.1.8 | +| sphincsharaka128srobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe4a | 1.3.9999.6.1.9 | +| sphincsharaka128ssimple | NIST Round 3 submission | 3 | 1 | 0xfe4b | 1.3.9999.6.1.10 | +| sphincsharaka128ssimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe4c | 1.3.9999.6.1.11 | +| sphincsharaka128ssimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe4d | 1.3.9999.6.1.12 | +| sphincsharaka192frobust | NIST Round 3 submission | 3 | 3 | 0xfe4e | 1.3.9999.6.2.1 | +| sphincsharaka192frobust **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe4f | 1.3.9999.6.2.2 | +| sphincsharaka192fsimple | NIST Round 3 submission | 3 | 3 | 0xfe50 | 1.3.9999.6.2.3 | +| sphincsharaka192fsimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe51 | 1.3.9999.6.2.4 | +| sphincsharaka192srobust | NIST Round 3 submission | 3 | 3 | 0xfe52 | 1.3.9999.6.2.5 | +| sphincsharaka192srobust **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe53 | 1.3.9999.6.2.6 | +| sphincsharaka192ssimple | NIST Round 3 submission | 3 | 3 | 0xfe54 | 1.3.9999.6.2.7 | +| sphincsharaka192ssimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe55 | 1.3.9999.6.2.8 | +| sphincsharaka256frobust | NIST Round 3 submission | 3 | 3 | 0xfe56 | 1.3.9999.6.3.1 | +| sphincsharaka256frobust **hybrid with** p521 | NIST Round 3 submission | 3 | 3 | 0xfe57 | 1.3.9999.6.3.2 | +| sphincsharaka256fsimple | NIST Round 3 submission | 3 | 5 | 0xfe58 | 1.3.9999.6.3.3 | +| sphincsharaka256fsimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe59 | 1.3.9999.6.3.4 | +| sphincsharaka256srobust | NIST Round 3 submission | 3 | 5 | 0xfe5a | 1.3.9999.6.3.5 | +| sphincsharaka256srobust **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe5b | 1.3.9999.6.3.6 | +| sphincsharaka256ssimple | NIST Round 3 submission | 3 | 5 | 0xfe5c | 1.3.9999.6.3.7 | +| sphincsharaka256ssimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe5d | 1.3.9999.6.3.8 | +| sphincssha26128frobust | NIST Round 3 submission | 3 | 5 | 0xfe5e | 1.3.9999.6.4.1 | +| sphincssha26128frobust **hybrid with** p256 | NIST Round 3 submission | 3 | 5 | 0xfe5f | 1.3.9999.6.4.2 | +| sphincssha26128frobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 5 | 0xfe60 | 1.3.9999.6.4.3 | +| sphincssha2128fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb3 | 1.3.9999.6.4.13 | +| sphincssha2128fsimple **hybrid with** p256 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb4 | 1.3.9999.6.4.14 | +| sphincssha2128fsimple **hybrid with** rsa3072 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb5 | 1.3.9999.6.4.15 | +| sphincssha2128fsimple | NIST Round 3 submission | 3 | 1 | 0xfe61 | 1.3.9999.6.4.4 | +| sphincssha2128fsimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe62 | 1.3.9999.6.4.5 | +| sphincssha2128fsimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe63 | 1.3.9999.6.4.6 | +| sphincssha256128srobust | NIST Round 3 submission | 3 | 5 | 0xfe64 | 1.3.9999.6.4.7 | +| sphincssha256128srobust **hybrid with** p256 | NIST Round 3 submission | 3 | 5 | 0xfe65 | 1.3.9999.6.4.8 | +| sphincssha256128srobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 5 | 0xfe66 | 1.3.9999.6.4.9 | +| sphincssha2128ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb6 | 1.3.9999.6.4.16 | +| sphincssha2128ssimple **hybrid with** p256 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb7 | 1.3.9999.6.4.17 | +| sphincssha2128ssimple **hybrid with** rsa3072 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfeb8 | 1.3.9999.6.4.18 | +| sphincssha2128ssimple | NIST Round 3 submission | 3 | 1 | 0xfe67 | 1.3.9999.6.4.10 | +| sphincssha2128ssimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe68 | 1.3.9999.6.4.11 | +| sphincssha2128ssimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe69 | 1.3.9999.6.4.12 | +| sphincssha256192frobust | NIST Round 3 submission | 3 | 5 | 0xfe6a | 1.3.9999.6.5.1 | +| sphincssha256192frobust **hybrid with** p384 | NIST Round 3 submission | 3 | 5 | 0xfe6b | 1.3.9999.6.5.2 | +| sphincssha2192fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfeb9 | 1.3.9999.6.5.10 | +| sphincssha2192fsimple **hybrid with** p384 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfeba | 1.3.9999.6.5.11 | +| sphincssha2192fsimple | NIST Round 3 submission | 3 | 3 | 0xfe6c | 1.3.9999.6.5.3 | +| sphincssha2192fsimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe6d | 1.3.9999.6.5.4 | +| sphincssha256192srobust | NIST Round 3 submission | 3 | 5 | 0xfe6e | 1.3.9999.6.5.5 | +| sphincssha256192srobust **hybrid with** p384 | NIST Round 3 submission | 3 | 5 | 0xfe6f | 1.3.9999.6.5.6 | +| sphincssha2192ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfebb | 1.3.9999.6.5.12 | +| sphincssha2192ssimple **hybrid with** p384 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfebc | 1.3.9999.6.5.13 | +| sphincssha2192ssimple | NIST Round 3 submission | 3 | 3 | 0xfe70 | 1.3.9999.6.5.7 | +| sphincssha2192ssimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe71 | 1.3.9999.6.5.8 | +| sphincssha256256frobust | NIST Round 3 submission | 3 | 5 | 0xfe72 | 1.3.9999.6.6.1 | +| sphincssha256256frobust **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe73 | 1.3.9999.6.6.2 | +| sphincssha2256fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfebd | 1.3.9999.6.6.10 | +| sphincssha2256fsimple **hybrid with** p521 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfebe | 1.3.9999.6.6.11 | +| sphincssha2256fsimple | NIST Round 3 submission | 3 | 5 | 0xfe74 | 1.3.9999.6.6.3 | +| sphincssha2256fsimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe75 | 1.3.9999.6.6.4 | +| sphincssha256256srobust | NIST Round 3 submission | 3 | 5 | 0xfe76 | 1.3.9999.6.6.5 | +| sphincssha256256srobust **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe77 | 1.3.9999.6.6.6 | +| sphincssha2256ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfec0 | 1.3.9999.6.6.12 | +| sphincssha2256ssimple **hybrid with** p521 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfec1 | 1.3.9999.6.6.13 | +| sphincssha2256ssimple | NIST Round 3 submission | 3 | 5 | 0xfe78 | 1.3.9999.6.6.7 | +| sphincssha2256ssimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe79 | 1.3.9999.6.6.8 | +| sphincsshake256128frobust | NIST Round 3 submission | 3 | 1 | 0xfe7a | 1.3.9999.6.7.1 | +| sphincsshake256128frobust **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe7b | 1.3.9999.6.7.2 | +| sphincsshake256128frobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe7c | 1.3.9999.6.7.3 | +| sphincsshake128fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec2 | 1.3.9999.6.7.13 | +| sphincsshake128fsimple **hybrid with** p256 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec3 | 1.3.9999.6.7.14 | +| sphincsshake128fsimple **hybrid with** rsa3072 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec4 | 1.3.9999.6.7.15 | +| sphincsshake128fsimple | NIST Round 3 submission | 3 | 1 | 0xfe7d | 1.3.9999.6.7.4 | +| sphincsshake128fsimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe7e | 1.3.9999.6.7.5 | +| sphincsshake128fsimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe7f | 1.3.9999.6.7.6 | +| sphincsshake256128srobust | NIST Round 3 submission | 3 | 1 | 0xfe80 | 1.3.9999.6.7.7 | +| sphincsshake256128srobust **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe81 | 1.3.9999.6.7.8 | +| sphincsshake256128srobust **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe82 | 1.3.9999.6.7.9 | +| sphincsshake128ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec5 | 1.3.9999.6.7.16 | +| sphincsshake128ssimple **hybrid with** p256 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec6 | 1.3.9999.6.7.17 | +| sphincsshake128ssimple **hybrid with** rsa3072 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 1 | 0xfec7 | 1.3.9999.6.7.18 | +| sphincsshake128ssimple | NIST Round 3 submission | 3 | 1 | 0xfe83 | 1.3.9999.6.7.10 | +| sphincsshake128ssimple **hybrid with** p256 | NIST Round 3 submission | 3 | 1 | 0xfe84 | 1.3.9999.6.7.11 | +| sphincsshake128ssimple **hybrid with** rsa3072 | NIST Round 3 submission | 3 | 1 | 0xfe85 | 1.3.9999.6.7.12 | +| sphincsshake256192frobust | NIST Round 3 submission | 3 | 3 | 0xfe86 | 1.3.9999.6.8.1 | +| sphincsshake256192frobust **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe87 | 1.3.9999.6.8.2 | +| sphincsshake192fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfec8 | 1.3.9999.6.8.10 | +| sphincsshake192fsimple **hybrid with** p384 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfec9 | 1.3.9999.6.8.11 | +| sphincsshake192fsimple | NIST Round 3 submission | 3 | 3 | 0xfe88 | 1.3.9999.6.8.3 | +| sphincsshake192fsimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe89 | 1.3.9999.6.8.4 | +| sphincsshake256192srobust | NIST Round 3 submission | 3 | 3 | 0xfe8a | 1.3.9999.6.8.5 | +| sphincsshake256192srobust **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe8b | 1.3.9999.6.8.6 | +| sphincsshake192ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfeca | 1.3.9999.6.8.12 | +| sphincsshake192ssimple **hybrid with** p384 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 3 | 0xfecb | 1.3.9999.6.8.13 | +| sphincsshake192ssimple | NIST Round 3 submission | 3 | 3 | 0xfe8c | 1.3.9999.6.8.7 | +| sphincsshake192ssimple **hybrid with** p384 | NIST Round 3 submission | 3 | 3 | 0xfe8d | 1.3.9999.6.8.8 | +| sphincsshake256256frobust | NIST Round 3 submission | 3 | 5 | 0xfe8e | 1.3.9999.6.9.1 | +| sphincsshake256256frobust **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe8f | 1.3.9999.6.9.2 | +| sphincsshake256fsimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfecc | 1.3.9999.6.9.10 | +| sphincsshake256fsimple **hybrid with** p521 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfecd | 1.3.9999.6.9.11 | +| sphincsshake256fsimple | NIST Round 3 submission | 3 | 5 | 0xfe90 | 1.3.9999.6.9.3 | +| sphincsshake256fsimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe91 | 1.3.9999.6.9.4 | +| sphincsshake256256srobust | NIST Round 3 submission | 3 | 5 | 0xfe92 | 1.3.9999.6.9.5 | +| sphincsshake256256srobust **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe93 | 1.3.9999.6.9.6 | +| sphincsshake256ssimple | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfece | 1.3.9999.6.9.12 | +| sphincsshake256ssimple **hybrid with** p521 | NIST Round 3 submission, v3.1 (June 10, 2022) | 3 | 5 | 0xfecf | 1.3.9999.6.9.13 | +| sphincsshake256ssimple | NIST Round 3 submission | 3 | 5 | 0xfe94 | 1.3.9999.6.9.7 | +| sphincsshake256ssimple **hybrid with** p521 | NIST Round 3 submission | 3 | 5 | 0xfe95 | 1.3.9999.6.9.8 | \ No newline at end of file diff --git a/oqsprov/oqs_decode_der2key.c b/oqsprov/oqs_decode_der2key.c index 180dc7f4..babfe183 100644 --- a/oqsprov/oqs_decode_der2key.c +++ b/oqsprov/oqs_decode_der2key.c @@ -620,6 +620,32 @@ MAKE_DECODER(, "kyber1024", kyber1024, oqsx, SubjectPublicKeyInfo); MAKE_DECODER(_ecp, "p521_kyber1024", p521_kyber1024, oqsx, PrivateKeyInfo); MAKE_DECODER(_ecp, "p521_kyber1024", p521_kyber1024, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "mlkem512", mlkem512, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "mlkem512", mlkem512, oqsx, SubjectPublicKeyInfo); + +MAKE_DECODER(_ecp, "p256_mlkem512", p256_mlkem512, oqsx, PrivateKeyInfo); +MAKE_DECODER(_ecp, "p256_mlkem512", p256_mlkem512, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(_ecx, "x25519_mlkem512", x25519_mlkem512, oqsx, PrivateKeyInfo); +MAKE_DECODER(_ecx, "x25519_mlkem512", x25519_mlkem512, oqsx, + SubjectPublicKeyInfo); +MAKE_DECODER(, "mlkem768", mlkem768, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "mlkem768", mlkem768, oqsx, SubjectPublicKeyInfo); + +MAKE_DECODER(_ecp, "p384_mlkem768", p384_mlkem768, oqsx, PrivateKeyInfo); +MAKE_DECODER(_ecp, "p384_mlkem768", p384_mlkem768, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(_ecx, "x448_mlkem768", x448_mlkem768, oqsx, PrivateKeyInfo); +MAKE_DECODER(_ecx, "x448_mlkem768", x448_mlkem768, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(_ecx, "x25519_mlkem768", x25519_mlkem768, oqsx, PrivateKeyInfo); +MAKE_DECODER(_ecx, "x25519_mlkem768", x25519_mlkem768, oqsx, + SubjectPublicKeyInfo); +MAKE_DECODER(_ecp, "p256_mlkem768", p256_mlkem768, oqsx, PrivateKeyInfo); +MAKE_DECODER(_ecp, "p256_mlkem768", p256_mlkem768, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "mlkem1024", mlkem1024, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "mlkem1024", mlkem1024, oqsx, SubjectPublicKeyInfo); + +MAKE_DECODER(_ecp, "p521_mlkem1024", p521_mlkem1024, oqsx, PrivateKeyInfo); +MAKE_DECODER(_ecp, "p521_mlkem1024", p521_mlkem1024, oqsx, + SubjectPublicKeyInfo); MAKE_DECODER(, "bikel1", bikel1, oqsx, PrivateKeyInfo); MAKE_DECODER(, "bikel1", bikel1, oqsx, SubjectPublicKeyInfo); @@ -711,6 +737,20 @@ MAKE_DECODER(, "dilithium5_bp384", dilithium5_bp384, oqsx, MAKE_DECODER(, "dilithium5_ed448", dilithium5_ed448, oqsx, PrivateKeyInfo); MAKE_DECODER(, "dilithium5_ed448", dilithium5_ed448, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "mldsa44", mldsa44, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "mldsa44", mldsa44, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "p256_mldsa44", p256_mldsa44, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "p256_mldsa44", p256_mldsa44, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "rsa3072_mldsa44", rsa3072_mldsa44, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "rsa3072_mldsa44", rsa3072_mldsa44, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "mldsa65", mldsa65, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "mldsa65", mldsa65, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "p384_mldsa65", p384_mldsa65, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "p384_mldsa65", p384_mldsa65, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "mldsa87", mldsa87, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "mldsa87", mldsa87, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "p521_mldsa87", p521_mldsa87, oqsx, PrivateKeyInfo); +MAKE_DECODER(, "p521_mldsa87", p521_mldsa87, oqsx, SubjectPublicKeyInfo); MAKE_DECODER(, "falcon512", falcon512, oqsx, PrivateKeyInfo); MAKE_DECODER(, "falcon512", falcon512, oqsx, SubjectPublicKeyInfo); MAKE_DECODER(, "p256_falcon512", p256_falcon512, oqsx, PrivateKeyInfo); diff --git a/oqsprov/oqs_encode_key2any.c b/oqsprov/oqs_encode_key2any.c index 3ef60fae..45b81417 100644 --- a/oqsprov/oqs_encode_key2any.c +++ b/oqsprov/oqs_encode_key2any.c @@ -999,6 +999,39 @@ static int oqsx_pki_priv_to_der(const void *vxkey, unsigned char **pder) #define p521_kyber1024_evp_type 0 #define p521_kyber1024_input_type "p521_kyber1024" #define p521_kyber1024_pem_type "p521_kyber1024" +#define mlkem512_evp_type 0 +#define mlkem512_input_type "mlkem512" +#define mlkem512_pem_type "mlkem512" + +#define p256_mlkem512_evp_type 0 +#define p256_mlkem512_input_type "p256_mlkem512" +#define p256_mlkem512_pem_type "p256_mlkem512" +#define x25519_mlkem512_evp_type 0 +#define x25519_mlkem512_input_type "x25519_mlkem512" +#define x25519_mlkem512_pem_type "x25519_mlkem512" +#define mlkem768_evp_type 0 +#define mlkem768_input_type "mlkem768" +#define mlkem768_pem_type "mlkem768" + +#define p384_mlkem768_evp_type 0 +#define p384_mlkem768_input_type "p384_mlkem768" +#define p384_mlkem768_pem_type "p384_mlkem768" +#define x448_mlkem768_evp_type 0 +#define x448_mlkem768_input_type "x448_mlkem768" +#define x448_mlkem768_pem_type "x448_mlkem768" +#define x25519_mlkem768_evp_type 0 +#define x25519_mlkem768_input_type "x25519_mlkem768" +#define x25519_mlkem768_pem_type "x25519_mlkem768" +#define p256_mlkem768_evp_type 0 +#define p256_mlkem768_input_type "p256_mlkem768" +#define p256_mlkem768_pem_type "p256_mlkem768" +#define mlkem1024_evp_type 0 +#define mlkem1024_input_type "mlkem1024" +#define mlkem1024_pem_type "mlkem1024" + +#define p521_mlkem1024_evp_type 0 +#define p521_mlkem1024_input_type "p521_mlkem1024" +#define p521_mlkem1024_pem_type "p521_mlkem1024" #define bikel1_evp_type 0 #define bikel1_input_type "bikel1" #define bikel1_pem_type "bikel1" @@ -1114,6 +1147,27 @@ static int oqsx_pki_priv_to_der(const void *vxkey, unsigned char **pder) #define dilithium5_ed448_evp_type 0 #define dilithium5_ed448_input_type "dilithium5_ed448" #define dilithium5_ed448_pem_type "dilithium5_ed448" +#define mldsa44_evp_type 0 +#define mldsa44_input_type "mldsa44" +#define mldsa44_pem_type "mldsa44" +#define p256_mldsa44_evp_type 0 +#define p256_mldsa44_input_type "p256_mldsa44" +#define p256_mldsa44_pem_type "p256_mldsa44" +#define rsa3072_mldsa44_evp_type 0 +#define rsa3072_mldsa44_input_type "rsa3072_mldsa44" +#define rsa3072_mldsa44_pem_type "rsa3072_mldsa44" +#define mldsa65_evp_type 0 +#define mldsa65_input_type "mldsa65" +#define mldsa65_pem_type "mldsa65" +#define p384_mldsa65_evp_type 0 +#define p384_mldsa65_input_type "p384_mldsa65" +#define p384_mldsa65_pem_type "p384_mldsa65" +#define mldsa87_evp_type 0 +#define mldsa87_input_type "mldsa87" +#define mldsa87_pem_type "mldsa87" +#define p521_mldsa87_evp_type 0 +#define p521_mldsa87_input_type "p521_mldsa87" +#define p521_mldsa87_pem_type "p521_mldsa87" #define falcon512_evp_type 0 #define falcon512_input_type "falcon512" #define falcon512_pem_type "falcon512" @@ -2011,6 +2065,79 @@ MAKE_ENCODER(_ecp, p521_kyber1024, oqsx, PrivateKeyInfo, pem); MAKE_ENCODER(_ecp, p521_kyber1024, oqsx, SubjectPublicKeyInfo, der); MAKE_ENCODER(_ecp, p521_kyber1024, oqsx, SubjectPublicKeyInfo, pem); MAKE_TEXT_ENCODER(_ecp, p521_kyber1024); +MAKE_ENCODER(, mlkem512, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, mlkem512, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, mlkem512, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, mlkem512, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, mlkem512, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, mlkem512, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, mlkem512); + +MAKE_ENCODER(_ecp, p256_mlkem512, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(_ecp, p256_mlkem512, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(_ecp, p256_mlkem512, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(_ecp, p256_mlkem512, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(_ecp, p256_mlkem512, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(_ecp, p256_mlkem512, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(_ecp, p256_mlkem512); +MAKE_ENCODER(_ecx, x25519_mlkem512, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(_ecx, x25519_mlkem512, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(_ecx, x25519_mlkem512, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(_ecx, x25519_mlkem512, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(_ecx, x25519_mlkem512, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(_ecx, x25519_mlkem512, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(_ecx, x25519_mlkem512); +MAKE_ENCODER(, mlkem768, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, mlkem768, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, mlkem768, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, mlkem768, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, mlkem768, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, mlkem768, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, mlkem768); + +MAKE_ENCODER(_ecp, p384_mlkem768, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(_ecp, p384_mlkem768, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(_ecp, p384_mlkem768, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(_ecp, p384_mlkem768, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(_ecp, p384_mlkem768, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(_ecp, p384_mlkem768, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(_ecp, p384_mlkem768); +MAKE_ENCODER(_ecx, x448_mlkem768, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(_ecx, x448_mlkem768, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(_ecx, x448_mlkem768, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(_ecx, x448_mlkem768, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(_ecx, x448_mlkem768, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(_ecx, x448_mlkem768, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(_ecx, x448_mlkem768); +MAKE_ENCODER(_ecx, x25519_mlkem768, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(_ecx, x25519_mlkem768, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(_ecx, x25519_mlkem768, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(_ecx, x25519_mlkem768, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(_ecx, x25519_mlkem768, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(_ecx, x25519_mlkem768, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(_ecx, x25519_mlkem768); +MAKE_ENCODER(_ecp, p256_mlkem768, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(_ecp, p256_mlkem768, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(_ecp, p256_mlkem768, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(_ecp, p256_mlkem768, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(_ecp, p256_mlkem768, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(_ecp, p256_mlkem768, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(_ecp, p256_mlkem768); +MAKE_ENCODER(, mlkem1024, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, mlkem1024, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, mlkem1024, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, mlkem1024, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, mlkem1024, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, mlkem1024, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, mlkem1024); + +MAKE_ENCODER(_ecp, p521_mlkem1024, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(_ecp, p521_mlkem1024, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(_ecp, p521_mlkem1024, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(_ecp, p521_mlkem1024, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(_ecp, p521_mlkem1024, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(_ecp, p521_mlkem1024, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(_ecp, p521_mlkem1024); MAKE_ENCODER(, bikel1, oqsx, EncryptedPrivateKeyInfo, der); MAKE_ENCODER(, bikel1, oqsx, EncryptedPrivateKeyInfo, pem); MAKE_ENCODER(, bikel1, oqsx, PrivateKeyInfo, der); @@ -2271,6 +2398,55 @@ MAKE_ENCODER(, dilithium5_ed448, oqsx, PrivateKeyInfo, pem); MAKE_ENCODER(, dilithium5_ed448, oqsx, SubjectPublicKeyInfo, der); MAKE_ENCODER(, dilithium5_ed448, oqsx, SubjectPublicKeyInfo, pem); MAKE_TEXT_ENCODER(, dilithium5_ed448); +MAKE_ENCODER(, mldsa44, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, mldsa44, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, mldsa44, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, mldsa44, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, mldsa44, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, mldsa44, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, mldsa44); +MAKE_ENCODER(, p256_mldsa44, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, p256_mldsa44, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, p256_mldsa44, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, p256_mldsa44, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, p256_mldsa44, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, p256_mldsa44, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, p256_mldsa44); +MAKE_ENCODER(, rsa3072_mldsa44, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, rsa3072_mldsa44, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, rsa3072_mldsa44, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, rsa3072_mldsa44, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, rsa3072_mldsa44, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, rsa3072_mldsa44, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, rsa3072_mldsa44); +MAKE_ENCODER(, mldsa65, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, mldsa65, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, mldsa65, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, mldsa65, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, mldsa65, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, mldsa65, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, mldsa65); +MAKE_ENCODER(, p384_mldsa65, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, p384_mldsa65, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, p384_mldsa65, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, p384_mldsa65, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, p384_mldsa65, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, p384_mldsa65, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, p384_mldsa65); +MAKE_ENCODER(, mldsa87, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, mldsa87, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, mldsa87, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, mldsa87, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, mldsa87, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, mldsa87, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, mldsa87); +MAKE_ENCODER(, p521_mldsa87, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, p521_mldsa87, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, p521_mldsa87, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, p521_mldsa87, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, p521_mldsa87, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, p521_mldsa87, oqsx, SubjectPublicKeyInfo, pem); +MAKE_TEXT_ENCODER(, p521_mldsa87); MAKE_ENCODER(, falcon512, oqsx, EncryptedPrivateKeyInfo, der); MAKE_ENCODER(, falcon512, oqsx, EncryptedPrivateKeyInfo, pem); MAKE_ENCODER(, falcon512, oqsx, PrivateKeyInfo, der); diff --git a/oqsprov/oqs_kmgmt.c b/oqsprov/oqs_kmgmt.c index 69de105c..853e53ed 100644 --- a/oqsprov/oqs_kmgmt.c +++ b/oqsprov/oqs_kmgmt.c @@ -816,126 +816,249 @@ static void *dilithium5_ed448_gen_init(void *provctx, int selection) "dilithium5_ed448", KEY_TYPE_CMP_SIG, 192, 19); } -static void *falcon512_new_key(void *provctx) +static void *mldsa44_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512, - "falcon512", KEY_TYPE_SIG, NULL, 128, 20); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "mldsa44", KEY_TYPE_SIG, NULL, 128, 20); } -static void *falcon512_gen_init(void *provctx, int selection) +static void *mldsa44_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "falcon512", 0, 128, 20); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, "mldsa44", + 0, 128, 20); } -static void *p256_falcon512_new_key(void *provctx) +static void *p256_mldsa44_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512, - "p256_falcon512", KEY_TYPE_HYB_SIG, NULL, 128, 21); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "p256_mldsa44", KEY_TYPE_HYB_SIG, NULL, 128, 21); } -static void *p256_falcon512_gen_init(void *provctx, int selection) +static void *p256_mldsa44_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "p256_falcon512", KEY_TYPE_HYB_SIG, 128, 21); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "p256_mldsa44", KEY_TYPE_HYB_SIG, 128, 21); } -static void *rsa3072_falcon512_new_key(void *provctx) +static void *rsa3072_mldsa44_new_key(void *provctx) { - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512, - "rsa3072_falcon512", KEY_TYPE_HYB_SIG, NULL, 128, 22); + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "rsa3072_mldsa44", KEY_TYPE_HYB_SIG, NULL, 128, 22); } -static void *rsa3072_falcon512_gen_init(void *provctx, int selection) +static void *rsa3072_mldsa44_gen_init(void *provctx, int selection) { - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "rsa3072_falcon512", KEY_TYPE_HYB_SIG, 128, 22); + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "rsa3072_mldsa44", KEY_TYPE_HYB_SIG, 128, 22); +} +static void *mldsa65_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, + "mldsa65", KEY_TYPE_SIG, NULL, 192, 23); +} + +static void *mldsa65_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, "mldsa65", + 0, 192, 23); +} +static void *p384_mldsa65_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, + "p384_mldsa65", KEY_TYPE_HYB_SIG, NULL, 192, 24); } -static void *falcon512_p256_new_key(void *provctx) + +static void *p384_mldsa65_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, + "p384_mldsa65", KEY_TYPE_HYB_SIG, 192, 24); +} +static void *mldsa87_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87, + "mldsa87", KEY_TYPE_SIG, NULL, 256, 25); +} + +static void *mldsa87_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, "mldsa87", + 0, 256, 25); +} +static void *p521_mldsa87_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87, + "p521_mldsa87", KEY_TYPE_HYB_SIG, NULL, 256, 26); +} + +static void *p521_mldsa87_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, + "p521_mldsa87", KEY_TYPE_HYB_SIG, 256, 26); +} + +static void *mldsa44_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "mldsa44", KEY_TYPE_SIG, NULL, 128, 27); +} + +static void *mldsa44_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, "mldsa44", + 0, 128, 27); +} +static void *p256_mldsa44_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "p256_mldsa44", KEY_TYPE_HYB_SIG, NULL, 128, 28); +} + +static void *p256_mldsa44_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "p256_mldsa44", KEY_TYPE_HYB_SIG, 128, 28); +} +static void *rsa3072_mldsa44_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, + "rsa3072_mldsa44", KEY_TYPE_HYB_SIG, NULL, 128, 29); +} + +static void *rsa3072_mldsa44_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, + "rsa3072_mldsa44", KEY_TYPE_HYB_SIG, 128, 29); +} +static void *mldsa65_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, + "mldsa65", KEY_TYPE_SIG, NULL, 192, 30); +} + +static void *mldsa65_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, "mldsa65", + 0, 192, 30); +} +static void *p384_mldsa65_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, + "p384_mldsa65", KEY_TYPE_HYB_SIG, NULL, 192, 31); +} + +static void *p384_mldsa65_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, + "p384_mldsa65", KEY_TYPE_HYB_SIG, 192, 31); +} +static void *mldsa87_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87, + "mldsa87", KEY_TYPE_SIG, NULL, 256, 32); +} + +static void *mldsa87_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, "mldsa87", + 0, 256, 32); +} +static void *p521_mldsa87_new_key(void *provctx) +{ + return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87, + "p521_mldsa87", KEY_TYPE_HYB_SIG, NULL, 256, 33); +} + +static void *p521_mldsa87_gen_init(void *provctx, int selection) +{ + return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, + "p521_mldsa87", KEY_TYPE_HYB_SIG, 256, 33); +} + +static void *falcon512_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512, - "falcon512_p256", KEY_TYPE_CMP_SIG, NULL, 128, 23); + "falcon512", KEY_TYPE_SIG, NULL, 128, 34); } -static void *falcon512_p256_gen_init(void *provctx, int selection) +static void *falcon512_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "falcon512_p256", KEY_TYPE_CMP_SIG, 128, 23); + "falcon512", 0, 128, 34); } -static void *falcon512_bp256_new_key(void *provctx) +static void *p256_falcon512_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512, - "falcon512_bp256", KEY_TYPE_CMP_SIG, NULL, 256, 24); + "p256_falcon512", KEY_TYPE_HYB_SIG, NULL, 128, 35); } -static void *falcon512_bp256_gen_init(void *provctx, int selection) +static void *p256_falcon512_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "falcon512_bp256", KEY_TYPE_CMP_SIG, 256, 24); + "p256_falcon512", KEY_TYPE_HYB_SIG, 128, 35); } -static void *falcon512_ed25519_new_key(void *provctx) +static void *rsa3072_falcon512_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512, - "falcon512_ed25519", KEY_TYPE_CMP_SIG, NULL, 128, 25); + "rsa3072_falcon512", KEY_TYPE_HYB_SIG, NULL, 128, 36); } -static void *falcon512_ed25519_gen_init(void *provctx, int selection) +static void *rsa3072_falcon512_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "falcon512_ed25519", KEY_TYPE_CMP_SIG, 128, 25); + "rsa3072_falcon512", KEY_TYPE_HYB_SIG, 128, 36); } static void *falcon1024_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_1024, - "falcon1024", KEY_TYPE_SIG, NULL, 256, 26); + "falcon1024", KEY_TYPE_SIG, NULL, 256, 37); } static void *falcon1024_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_1024, - "falcon1024", 0, 256, 26); + "falcon1024", 0, 256, 37); } static void *p521_falcon1024_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_1024, - "p521_falcon1024", KEY_TYPE_HYB_SIG, NULL, 256, 27); + "p521_falcon1024", KEY_TYPE_HYB_SIG, NULL, 256, 38); } static void *p521_falcon1024_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_1024, - "p521_falcon1024", KEY_TYPE_HYB_SIG, 256, 27); + "p521_falcon1024", KEY_TYPE_HYB_SIG, 256, 38); } static void *sphincssha2128fsimple_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128f_simple, - "sphincssha2128fsimple", KEY_TYPE_SIG, NULL, 128, 28); + "sphincssha2128fsimple", KEY_TYPE_SIG, NULL, 128, 39); } static void *sphincssha2128fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_sphincs_sha2_128f_simple, - "sphincssha2128fsimple", 0, 128, 28); + "sphincssha2128fsimple", 0, 128, 39); } static void *p256_sphincssha2128fsimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128f_simple, - "p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 29); + "p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 40); } static void *p256_sphincssha2128fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_sha2_128f_simple, - "p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 29); + "p256_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 40); } static void *rsa3072_sphincssha2128fsimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128f_simple, - "rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 30); + "rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 41); } static void *rsa3072_sphincssha2128fsimple_gen_init(void *provctx, @@ -943,39 +1066,39 @@ static void *rsa3072_sphincssha2128fsimple_gen_init(void *provctx, { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_sha2_128f_simple, - "rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 30); + "rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 41); } static void *sphincssha2128ssimple_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128s_simple, - "sphincssha2128ssimple", KEY_TYPE_SIG, NULL, 128, 31); + "sphincssha2128ssimple", KEY_TYPE_SIG, NULL, 128, 42); } static void *sphincssha2128ssimple_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_sphincs_sha2_128s_simple, - "sphincssha2128ssimple", 0, 128, 31); + "sphincssha2128ssimple", 0, 128, 42); } static void *p256_sphincssha2128ssimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128s_simple, - "p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 32); + "p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 43); } static void *p256_sphincssha2128ssimple_gen_init(void *provctx, int selection) { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_sha2_128s_simple, - "p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 32); + "p256_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 43); } static void *rsa3072_sphincssha2128ssimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_128s_simple, - "rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 33); + "rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, NULL, 128, 44); } static void *rsa3072_sphincssha2128ssimple_gen_init(void *provctx, @@ -983,66 +1106,66 @@ static void *rsa3072_sphincssha2128ssimple_gen_init(void *provctx, { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_sha2_128s_simple, - "rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 33); + "rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 44); } static void *sphincssha2192fsimple_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_192f_simple, - "sphincssha2192fsimple", KEY_TYPE_SIG, NULL, 192, 34); + "sphincssha2192fsimple", KEY_TYPE_SIG, NULL, 192, 45); } static void *sphincssha2192fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_sphincs_sha2_192f_simple, - "sphincssha2192fsimple", 0, 192, 34); + "sphincssha2192fsimple", 0, 192, 45); } static void *p384_sphincssha2192fsimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_sha2_192f_simple, - "p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, NULL, 192, 35); + "p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, NULL, 192, 46); } static void *p384_sphincssha2192fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_sha2_192f_simple, - "p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, 192, 35); + "p384_sphincssha2192fsimple", KEY_TYPE_HYB_SIG, 192, 46); } static void *sphincsshake128fsimple_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_shake_128f_simple, - "sphincsshake128fsimple", KEY_TYPE_SIG, NULL, 128, 36); + "sphincsshake128fsimple", KEY_TYPE_SIG, NULL, 128, 47); } static void *sphincsshake128fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_sphincs_shake_128f_simple, - "sphincsshake128fsimple", 0, 128, 36); + "sphincsshake128fsimple", 0, 128, 47); } static void *p256_sphincsshake128fsimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_shake_128f_simple, - "p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 37); + "p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 48); } static void *p256_sphincsshake128fsimple_gen_init(void *provctx, int selection) { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_shake_128f_simple, - "p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 37); + "p256_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 48); } static void *rsa3072_sphincsshake128fsimple_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_sphincs_shake_128f_simple, - "rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 38); + "rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, NULL, 128, 49); } static void *rsa3072_sphincsshake128fsimple_gen_init(void *provctx, @@ -1050,7 +1173,7 @@ static void *rsa3072_sphincsshake128fsimple_gen_init(void *provctx, { return oqsx_gen_init( provctx, selection, OQS_SIG_alg_sphincs_shake_128f_simple, - "rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 38); + "rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 49); } ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_CONSTRUCTORS_END @@ -1222,6 +1345,13 @@ MAKE_SIG_KEYMGMT_FUNCTIONS(p521_dilithium5) MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium5_p384) MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium5_bp384) MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium5_ed448) +MAKE_SIG_KEYMGMT_FUNCTIONS(mldsa44) +MAKE_SIG_KEYMGMT_FUNCTIONS(p256_mldsa44) +MAKE_SIG_KEYMGMT_FUNCTIONS(rsa3072_mldsa44) +MAKE_SIG_KEYMGMT_FUNCTIONS(mldsa65) +MAKE_SIG_KEYMGMT_FUNCTIONS(p384_mldsa65) +MAKE_SIG_KEYMGMT_FUNCTIONS(mldsa87) +MAKE_SIG_KEYMGMT_FUNCTIONS(p521_mldsa87) MAKE_SIG_KEYMGMT_FUNCTIONS(falcon512) MAKE_SIG_KEYMGMT_FUNCTIONS(p256_falcon512) MAKE_SIG_KEYMGMT_FUNCTIONS(rsa3072_falcon512) @@ -1294,6 +1424,22 @@ MAKE_KEM_ECP_KEYMGMT_FUNCTIONS(p256_kyber768, OQS_KEM_alg_kyber_768, 128) MAKE_KEM_KEYMGMT_FUNCTIONS(kyber1024, OQS_KEM_alg_kyber_1024, 256) MAKE_KEM_ECP_KEYMGMT_FUNCTIONS(p521_kyber1024, OQS_KEM_alg_kyber_1024, 256) +MAKE_KEM_KEYMGMT_FUNCTIONS(mlkem512, OQS_KEM_alg_ml_kem_512, 128) + +MAKE_KEM_ECP_KEYMGMT_FUNCTIONS(p256_mlkem512, OQS_KEM_alg_ml_kem_512, 128) + +MAKE_KEM_ECX_KEYMGMT_FUNCTIONS(x25519_mlkem512, OQS_KEM_alg_ml_kem_512, 128) +MAKE_KEM_KEYMGMT_FUNCTIONS(mlkem768, OQS_KEM_alg_ml_kem_768, 192) + +MAKE_KEM_ECP_KEYMGMT_FUNCTIONS(p384_mlkem768, OQS_KEM_alg_ml_kem_768, 192) + +MAKE_KEM_ECX_KEYMGMT_FUNCTIONS(x448_mlkem768, OQS_KEM_alg_ml_kem_768, 192) + +MAKE_KEM_ECX_KEYMGMT_FUNCTIONS(x25519_mlkem768, OQS_KEM_alg_ml_kem_768, 128) +MAKE_KEM_ECP_KEYMGMT_FUNCTIONS(p256_mlkem768, OQS_KEM_alg_ml_kem_768, 128) +MAKE_KEM_KEYMGMT_FUNCTIONS(mlkem1024, OQS_KEM_alg_ml_kem_1024, 256) + +MAKE_KEM_ECP_KEYMGMT_FUNCTIONS(p521_mlkem1024, OQS_KEM_alg_ml_kem_1024, 256) MAKE_KEM_KEYMGMT_FUNCTIONS(bikel1, OQS_KEM_alg_bike_l1, 128) MAKE_KEM_ECP_KEYMGMT_FUNCTIONS(p256_bikel1, OQS_KEM_alg_bike_l1, 128) diff --git a/oqsprov/oqs_prov.h b/oqsprov/oqs_prov.h index 7ed809c4..5b40fb5f 100644 --- a/oqsprov/oqs_prov.h +++ b/oqsprov/oqs_prov.h @@ -705,6 +705,176 @@ extern const OSSL_DISPATCH oqs_PrivateKeyInfo_der_to_p521_kyber1024_decoder_functions[]; extern const OSSL_DISPATCH oqs_SubjectPublicKeyInfo_der_to_p521_kyber1024_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem512_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem512_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem512_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem512_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem512_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem512_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mlkem512_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_mlkem512_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_mlkem512_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem512_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem512_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem512_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem512_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem512_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem512_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_p256_mlkem512_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_p256_mlkem512_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_p256_mlkem512_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem512_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem512_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem512_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem512_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem512_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem512_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_x25519_mlkem512_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_x25519_mlkem512_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_x25519_mlkem512_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem768_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem768_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem768_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem768_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem768_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem768_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mlkem768_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_mlkem768_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_mlkem768_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mlkem768_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mlkem768_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mlkem768_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mlkem768_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mlkem768_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mlkem768_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_p384_mlkem768_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_p384_mlkem768_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_p384_mlkem768_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_x448_mlkem768_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x448_mlkem768_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x448_mlkem768_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x448_mlkem768_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x448_mlkem768_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x448_mlkem768_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_x448_mlkem768_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_x448_mlkem768_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_x448_mlkem768_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem768_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem768_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem768_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem768_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem768_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_x25519_mlkem768_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_x25519_mlkem768_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_x25519_mlkem768_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_x25519_mlkem768_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem768_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem768_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem768_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem768_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem768_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mlkem768_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_p256_mlkem768_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_p256_mlkem768_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_p256_mlkem768_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem1024_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem1024_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem1024_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem1024_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem1024_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mlkem1024_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mlkem1024_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_mlkem1024_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_mlkem1024_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mlkem1024_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mlkem1024_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mlkem1024_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mlkem1024_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mlkem1024_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mlkem1024_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_p521_mlkem1024_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_p521_mlkem1024_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_p521_mlkem1024_decoder_functions[]; extern const OSSL_DISPATCH oqs_bikel1_to_PrivateKeyInfo_der_encoder_functions[]; extern const OSSL_DISPATCH oqs_bikel1_to_PrivateKeyInfo_pem_encoder_functions[]; extern const OSSL_DISPATCH @@ -1302,6 +1472,125 @@ extern const OSSL_DISPATCH oqs_PrivateKeyInfo_der_to_dilithium5_ed448_decoder_functions[]; extern const OSSL_DISPATCH oqs_SubjectPublicKeyInfo_der_to_dilithium5_ed448_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa44_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa44_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa44_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa44_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa44_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa44_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mldsa44_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_mldsa44_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_mldsa44_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mldsa44_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mldsa44_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mldsa44_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mldsa44_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mldsa44_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p256_mldsa44_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_p256_mldsa44_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_p256_mldsa44_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_p256_mldsa44_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_rsa3072_mldsa44_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_rsa3072_mldsa44_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_rsa3072_mldsa44_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_rsa3072_mldsa44_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_rsa3072_mldsa44_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_rsa3072_mldsa44_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_rsa3072_mldsa44_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_rsa3072_mldsa44_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_rsa3072_mldsa44_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa65_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa65_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa65_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa65_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa65_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa65_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mldsa65_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_mldsa65_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_mldsa65_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mldsa65_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mldsa65_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mldsa65_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mldsa65_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mldsa65_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p384_mldsa65_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_p384_mldsa65_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_p384_mldsa65_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_p384_mldsa65_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa87_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa87_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa87_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa87_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa87_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_mldsa87_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_mldsa87_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_mldsa87_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_mldsa87_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mldsa87_to_PrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mldsa87_to_PrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mldsa87_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mldsa87_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mldsa87_to_SubjectPublicKeyInfo_der_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_p521_mldsa87_to_SubjectPublicKeyInfo_pem_encoder_functions[]; +extern const OSSL_DISPATCH oqs_p521_mldsa87_to_text_encoder_functions[]; +extern const OSSL_DISPATCH + oqs_PrivateKeyInfo_der_to_p521_mldsa87_decoder_functions[]; +extern const OSSL_DISPATCH + oqs_SubjectPublicKeyInfo_der_to_p521_mldsa87_decoder_functions[]; extern const OSSL_DISPATCH oqs_falcon512_to_PrivateKeyInfo_der_encoder_functions[]; extern const OSSL_DISPATCH @@ -1705,6 +1994,13 @@ extern const OSSL_DISPATCH oqs_p521_dilithium5_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_dilithium5_p384_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_dilithium5_bp384_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_dilithium5_ed448_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_mldsa44_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_p256_mldsa44_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_rsa3072_mldsa44_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_mldsa65_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_p384_mldsa65_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_mldsa87_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_p521_mldsa87_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_falcon512_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_p256_falcon512_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_rsa3072_falcon512_keymgmt_functions[]; @@ -1763,6 +2059,19 @@ extern const OSSL_DISPATCH oqs_ecp_p256_kyber768_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_kyber1024_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_ecp_p521_kyber1024_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_mlkem512_keymgmt_functions[]; + +extern const OSSL_DISPATCH oqs_ecp_p256_mlkem512_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_ecx_x25519_mlkem512_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_mlkem768_keymgmt_functions[]; + +extern const OSSL_DISPATCH oqs_ecp_p384_mlkem768_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_ecx_x448_mlkem768_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_ecx_x25519_mlkem768_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_ecp_p256_mlkem768_keymgmt_functions[]; +extern const OSSL_DISPATCH oqs_mlkem1024_keymgmt_functions[]; + +extern const OSSL_DISPATCH oqs_ecp_p521_mlkem1024_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_bikel1_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_ecp_p256_bikel1_keymgmt_functions[]; diff --git a/oqsprov/oqsdecoders.inc b/oqsprov/oqsdecoders.inc index 3496d68d..eda81119 100644 --- a/oqsprov/oqsdecoders.inc +++ b/oqsprov/oqsdecoders.inc @@ -139,6 +139,41 @@ DECODER_w_structure("frodo640aes", der, PrivateKeyInfo, frodo640aes), DECODER_w_structure("p521_kyber1024", der, SubjectPublicKeyInfo, p521_kyber1024), # endif +# ifdef OQS_ENABLE_KEM_ml_kem_512 + DECODER_w_structure("mlkem512", der, PrivateKeyInfo, mlkem512), + DECODER_w_structure("mlkem512", der, SubjectPublicKeyInfo, mlkem512), + DECODER_w_structure("p256_mlkem512", der, PrivateKeyInfo, p256_mlkem512), + DECODER_w_structure("p256_mlkem512", der, SubjectPublicKeyInfo, + p256_mlkem512), + DECODER_w_structure("x25519_mlkem512", der, PrivateKeyInfo, + x25519_mlkem512), + DECODER_w_structure("x25519_mlkem512", der, SubjectPublicKeyInfo, + x25519_mlkem512), +# endif +# ifdef OQS_ENABLE_KEM_ml_kem_768 + DECODER_w_structure("mlkem768", der, PrivateKeyInfo, mlkem768), + DECODER_w_structure("mlkem768", der, SubjectPublicKeyInfo, mlkem768), + DECODER_w_structure("p384_mlkem768", der, PrivateKeyInfo, p384_mlkem768), + DECODER_w_structure("p384_mlkem768", der, SubjectPublicKeyInfo, + p384_mlkem768), + DECODER_w_structure("x448_mlkem768", der, PrivateKeyInfo, x448_mlkem768), + DECODER_w_structure("x448_mlkem768", der, SubjectPublicKeyInfo, + x448_mlkem768), + DECODER_w_structure("x25519_mlkem768", der, PrivateKeyInfo, + x25519_mlkem768), + DECODER_w_structure("x25519_mlkem768", der, SubjectPublicKeyInfo, + x25519_mlkem768), + DECODER_w_structure("p256_mlkem768", der, PrivateKeyInfo, p256_mlkem768), + DECODER_w_structure("p256_mlkem768", der, SubjectPublicKeyInfo, + p256_mlkem768), +# endif +# ifdef OQS_ENABLE_KEM_ml_kem_1024 + DECODER_w_structure("mlkem1024", der, PrivateKeyInfo, mlkem1024), + DECODER_w_structure("mlkem1024", der, SubjectPublicKeyInfo, mlkem1024), + DECODER_w_structure("p521_mlkem1024", der, PrivateKeyInfo, p521_mlkem1024), + DECODER_w_structure("p521_mlkem1024", der, SubjectPublicKeyInfo, + p521_mlkem1024), +# endif # ifdef OQS_ENABLE_KEM_bike_l1 DECODER_w_structure("bikel1", der, PrivateKeyInfo, bikel1), DECODER_w_structure("bikel1", der, SubjectPublicKeyInfo, bikel1), @@ -268,6 +303,31 @@ DECODER_w_structure("frodo640aes", der, PrivateKeyInfo, frodo640aes), DECODER_w_structure("dilithium5_ed448", der, SubjectPublicKeyInfo, dilithium5_ed448), #endif +#ifdef OQS_ENABLE_SIG_ml_dsa_44 + DECODER_w_structure("mldsa44", der, PrivateKeyInfo, mldsa44), + DECODER_w_structure("mldsa44", der, SubjectPublicKeyInfo, mldsa44), + DECODER_w_structure("p256_mldsa44", der, PrivateKeyInfo, p256_mldsa44), + DECODER_w_structure("p256_mldsa44", der, SubjectPublicKeyInfo, + p256_mldsa44), + DECODER_w_structure("rsa3072_mldsa44", der, PrivateKeyInfo, + rsa3072_mldsa44), + DECODER_w_structure("rsa3072_mldsa44", der, SubjectPublicKeyInfo, + rsa3072_mldsa44), +#endif +#ifdef OQS_ENABLE_SIG_ml_dsa_65 + DECODER_w_structure("mldsa65", der, PrivateKeyInfo, mldsa65), + DECODER_w_structure("mldsa65", der, SubjectPublicKeyInfo, mldsa65), + DECODER_w_structure("p384_mldsa65", der, PrivateKeyInfo, p384_mldsa65), + DECODER_w_structure("p384_mldsa65", der, SubjectPublicKeyInfo, + p384_mldsa65), +#endif +#ifdef OQS_ENABLE_SIG_ml_dsa_87 + DECODER_w_structure("mldsa87", der, PrivateKeyInfo, mldsa87), + DECODER_w_structure("mldsa87", der, SubjectPublicKeyInfo, mldsa87), + DECODER_w_structure("p521_mldsa87", der, PrivateKeyInfo, p521_mldsa87), + DECODER_w_structure("p521_mldsa87", der, SubjectPublicKeyInfo, + p521_mldsa87), +#endif #ifdef OQS_ENABLE_SIG_falcon_512 DECODER_w_structure("falcon512", der, PrivateKeyInfo, falcon512), DECODER_w_structure("falcon512", der, SubjectPublicKeyInfo, falcon512), diff --git a/oqsprov/oqsencoders.inc b/oqsprov/oqsencoders.inc index 88729583..08442ac5 100644 --- a/oqsprov/oqsencoders.inc +++ b/oqsprov/oqsencoders.inc @@ -393,6 +393,114 @@ ENCODER_w_structure("frodo640aes", frodo640aes, der, PrivateKeyInfo), SubjectPublicKeyInfo), ENCODER_TEXT("p521_kyber1024", p521_kyber1024), # endif +# ifdef OQS_ENABLE_KEM_ml_kem_512 + ENCODER_w_structure("mlkem512", mlkem512, der, PrivateKeyInfo), + ENCODER_w_structure("mlkem512", mlkem512, pem, PrivateKeyInfo), + ENCODER_w_structure("mlkem512", mlkem512, der, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mlkem512", mlkem512, pem, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mlkem512", mlkem512, der, SubjectPublicKeyInfo), + ENCODER_w_structure("mlkem512", mlkem512, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("mlkem512", mlkem512), + ENCODER_w_structure("p256_mlkem512", p256_mlkem512, der, PrivateKeyInfo), + ENCODER_w_structure("p256_mlkem512", p256_mlkem512, pem, PrivateKeyInfo), + ENCODER_w_structure("p256_mlkem512", p256_mlkem512, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p256_mlkem512", p256_mlkem512, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p256_mlkem512", p256_mlkem512, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("p256_mlkem512", p256_mlkem512, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("p256_mlkem512", p256_mlkem512), + ENCODER_w_structure("x25519_mlkem512", x25519_mlkem512, der, + PrivateKeyInfo), + ENCODER_w_structure("x25519_mlkem512", x25519_mlkem512, pem, + PrivateKeyInfo), + ENCODER_w_structure("x25519_mlkem512", x25519_mlkem512, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("x25519_mlkem512", x25519_mlkem512, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("x25519_mlkem512", x25519_mlkem512, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("x25519_mlkem512", x25519_mlkem512, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("x25519_mlkem512", x25519_mlkem512), +# endif +# ifdef OQS_ENABLE_KEM_ml_kem_768 + ENCODER_w_structure("mlkem768", mlkem768, der, PrivateKeyInfo), + ENCODER_w_structure("mlkem768", mlkem768, pem, PrivateKeyInfo), + ENCODER_w_structure("mlkem768", mlkem768, der, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mlkem768", mlkem768, pem, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mlkem768", mlkem768, der, SubjectPublicKeyInfo), + ENCODER_w_structure("mlkem768", mlkem768, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("mlkem768", mlkem768), + ENCODER_w_structure("p384_mlkem768", p384_mlkem768, der, PrivateKeyInfo), + ENCODER_w_structure("p384_mlkem768", p384_mlkem768, pem, PrivateKeyInfo), + ENCODER_w_structure("p384_mlkem768", p384_mlkem768, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p384_mlkem768", p384_mlkem768, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p384_mlkem768", p384_mlkem768, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("p384_mlkem768", p384_mlkem768, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("p384_mlkem768", p384_mlkem768), + ENCODER_w_structure("x448_mlkem768", x448_mlkem768, der, PrivateKeyInfo), + ENCODER_w_structure("x448_mlkem768", x448_mlkem768, pem, PrivateKeyInfo), + ENCODER_w_structure("x448_mlkem768", x448_mlkem768, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("x448_mlkem768", x448_mlkem768, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("x448_mlkem768", x448_mlkem768, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("x448_mlkem768", x448_mlkem768, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("x448_mlkem768", x448_mlkem768), + ENCODER_w_structure("x25519_mlkem768", x25519_mlkem768, der, + PrivateKeyInfo), + ENCODER_w_structure("x25519_mlkem768", x25519_mlkem768, pem, + PrivateKeyInfo), + ENCODER_w_structure("x25519_mlkem768", x25519_mlkem768, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("x25519_mlkem768", x25519_mlkem768, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("x25519_mlkem768", x25519_mlkem768, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("x25519_mlkem768", x25519_mlkem768, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("x25519_mlkem768", x25519_mlkem768), + ENCODER_w_structure("p256_mlkem768", p256_mlkem768, der, PrivateKeyInfo), + ENCODER_w_structure("p256_mlkem768", p256_mlkem768, pem, PrivateKeyInfo), + ENCODER_w_structure("p256_mlkem768", p256_mlkem768, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p256_mlkem768", p256_mlkem768, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p256_mlkem768", p256_mlkem768, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("p256_mlkem768", p256_mlkem768, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("p256_mlkem768", p256_mlkem768), +# endif +# ifdef OQS_ENABLE_KEM_ml_kem_1024 + ENCODER_w_structure("mlkem1024", mlkem1024, der, PrivateKeyInfo), + ENCODER_w_structure("mlkem1024", mlkem1024, pem, PrivateKeyInfo), + ENCODER_w_structure("mlkem1024", mlkem1024, der, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mlkem1024", mlkem1024, pem, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mlkem1024", mlkem1024, der, SubjectPublicKeyInfo), + ENCODER_w_structure("mlkem1024", mlkem1024, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("mlkem1024", mlkem1024), + ENCODER_w_structure("p521_mlkem1024", p521_mlkem1024, der, PrivateKeyInfo), + ENCODER_w_structure("p521_mlkem1024", p521_mlkem1024, pem, PrivateKeyInfo), + ENCODER_w_structure("p521_mlkem1024", p521_mlkem1024, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p521_mlkem1024", p521_mlkem1024, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p521_mlkem1024", p521_mlkem1024, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("p521_mlkem1024", p521_mlkem1024, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("p521_mlkem1024", p521_mlkem1024), +# endif # ifdef OQS_ENABLE_KEM_bike_l1 ENCODER_w_structure("bikel1", bikel1, der, PrivateKeyInfo), ENCODER_w_structure("bikel1", bikel1, pem, PrivateKeyInfo), @@ -792,6 +900,79 @@ ENCODER_w_structure("frodo640aes", frodo640aes, der, PrivateKeyInfo), SubjectPublicKeyInfo), ENCODER_TEXT("dilithium5_ed448", dilithium5_ed448), #endif +#ifdef OQS_ENABLE_SIG_ml_dsa_44 + ENCODER_w_structure("mldsa44", mldsa44, der, PrivateKeyInfo), + ENCODER_w_structure("mldsa44", mldsa44, pem, PrivateKeyInfo), + ENCODER_w_structure("mldsa44", mldsa44, der, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mldsa44", mldsa44, pem, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mldsa44", mldsa44, der, SubjectPublicKeyInfo), + ENCODER_w_structure("mldsa44", mldsa44, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("mldsa44", mldsa44), + ENCODER_w_structure("p256_mldsa44", p256_mldsa44, der, PrivateKeyInfo), + ENCODER_w_structure("p256_mldsa44", p256_mldsa44, pem, PrivateKeyInfo), + ENCODER_w_structure("p256_mldsa44", p256_mldsa44, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p256_mldsa44", p256_mldsa44, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p256_mldsa44", p256_mldsa44, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("p256_mldsa44", p256_mldsa44, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("p256_mldsa44", p256_mldsa44), + ENCODER_w_structure("rsa3072_mldsa44", rsa3072_mldsa44, der, + PrivateKeyInfo), + ENCODER_w_structure("rsa3072_mldsa44", rsa3072_mldsa44, pem, + PrivateKeyInfo), + ENCODER_w_structure("rsa3072_mldsa44", rsa3072_mldsa44, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("rsa3072_mldsa44", rsa3072_mldsa44, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("rsa3072_mldsa44", rsa3072_mldsa44, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("rsa3072_mldsa44", rsa3072_mldsa44, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("rsa3072_mldsa44", rsa3072_mldsa44), +#endif +#ifdef OQS_ENABLE_SIG_ml_dsa_65 + ENCODER_w_structure("mldsa65", mldsa65, der, PrivateKeyInfo), + ENCODER_w_structure("mldsa65", mldsa65, pem, PrivateKeyInfo), + ENCODER_w_structure("mldsa65", mldsa65, der, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mldsa65", mldsa65, pem, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mldsa65", mldsa65, der, SubjectPublicKeyInfo), + ENCODER_w_structure("mldsa65", mldsa65, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("mldsa65", mldsa65), + ENCODER_w_structure("p384_mldsa65", p384_mldsa65, der, PrivateKeyInfo), + ENCODER_w_structure("p384_mldsa65", p384_mldsa65, pem, PrivateKeyInfo), + ENCODER_w_structure("p384_mldsa65", p384_mldsa65, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p384_mldsa65", p384_mldsa65, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p384_mldsa65", p384_mldsa65, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("p384_mldsa65", p384_mldsa65, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("p384_mldsa65", p384_mldsa65), +#endif +#ifdef OQS_ENABLE_SIG_ml_dsa_87 + ENCODER_w_structure("mldsa87", mldsa87, der, PrivateKeyInfo), + ENCODER_w_structure("mldsa87", mldsa87, pem, PrivateKeyInfo), + ENCODER_w_structure("mldsa87", mldsa87, der, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mldsa87", mldsa87, pem, EncryptedPrivateKeyInfo), + ENCODER_w_structure("mldsa87", mldsa87, der, SubjectPublicKeyInfo), + ENCODER_w_structure("mldsa87", mldsa87, pem, SubjectPublicKeyInfo), + ENCODER_TEXT("mldsa87", mldsa87), + ENCODER_w_structure("p521_mldsa87", p521_mldsa87, der, PrivateKeyInfo), + ENCODER_w_structure("p521_mldsa87", p521_mldsa87, pem, PrivateKeyInfo), + ENCODER_w_structure("p521_mldsa87", p521_mldsa87, der, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p521_mldsa87", p521_mldsa87, pem, + EncryptedPrivateKeyInfo), + ENCODER_w_structure("p521_mldsa87", p521_mldsa87, der, + SubjectPublicKeyInfo), + ENCODER_w_structure("p521_mldsa87", p521_mldsa87, pem, + SubjectPublicKeyInfo), + ENCODER_TEXT("p521_mldsa87", p521_mldsa87), +#endif #ifdef OQS_ENABLE_SIG_falcon_512 ENCODER_w_structure("falcon512", falcon512, der, PrivateKeyInfo), ENCODER_w_structure("falcon512", falcon512, pem, PrivateKeyInfo), diff --git a/oqsprov/oqsprov.c b/oqsprov/oqsprov.c index 541a0ba9..5bc18fdd 100644 --- a/oqsprov/oqsprov.c +++ b/oqsprov/oqsprov.c @@ -49,45 +49,45 @@ extern OSSL_FUNC_provider_get_capabilities_fn oqs_provider_get_capabilities; ///// OQS_TEMPLATE_FRAGMENT_ASSIGN_SIG_OIDS_START #ifdef OQS_KEM_ENCODERS -# define OQS_OID_CNT 162 +# define OQS_OID_CNT 176 #else -# define OQS_OID_CNT 78 +# define OQS_OID_CNT 92 #endif const char *oqs_oid_alg_list[OQS_OID_CNT] = { #ifdef OQS_KEM_ENCODERS - "1.3.9999.99.13", + "1.3.9999.99.16", "frodo640aes", - "1.3.9999.99.12", + "1.3.9999.99.15", "p256_frodo640aes", "1.3.9999.99.1", "x25519_frodo640aes", - "1.3.9999.99.15", + "1.3.9999.99.18", "frodo640shake", - "1.3.9999.99.14", + "1.3.9999.99.17", "p256_frodo640shake", "1.3.9999.99.2", "x25519_frodo640shake", - "1.3.9999.99.17", + "1.3.9999.99.20", "frodo976aes", - "1.3.9999.99.16", + "1.3.9999.99.19", "p384_frodo976aes", "1.3.9999.99.3", "x448_frodo976aes", - "1.3.9999.99.19", + "1.3.9999.99.22", "frodo976shake", - "1.3.9999.99.18", + "1.3.9999.99.21", "p384_frodo976shake", "1.3.9999.99.4", "x448_frodo976shake", - "1.3.9999.99.21", + "1.3.9999.99.24", "frodo1344aes", - "1.3.9999.99.20", - "p521_frodo1344aes", "1.3.9999.99.23", + "p521_frodo1344aes", + "1.3.9999.99.26", "frodo1344shake", - "1.3.9999.99.22", + "1.3.9999.99.25", "p521_frodo1344shake", "1.3.6.1.4.1.22554.5.6.1", "kyber512", @@ -97,7 +97,7 @@ const char *oqs_oid_alg_list[OQS_OID_CNT] = { "x25519_kyber512", "1.3.6.1.4.1.22554.5.6.2", "kyber768", - "1.3.9999.99.24", + "1.3.9999.99.27", "p384_kyber768", "1.3.9999.99.5", "x448_kyber768", @@ -107,39 +107,59 @@ const char *oqs_oid_alg_list[OQS_OID_CNT] = { "p256_kyber768", "1.3.6.1.4.1.22554.5.6.3", "kyber1024", - "1.3.9999.99.25", + "1.3.9999.99.28", "p521_kyber1024", - "1.3.9999.99.27", + "1.3.6.1.4.1.22554.5.6.1", + "mlkem512", + "1.3.6.1.4.1.22554.5.7.1", + "p256_mlkem512", + "1.3.6.1.4.1.22554.5.8.1", + "x25519_mlkem512", + "1.3.6.1.4.1.22554.5.6.2", + "mlkem768", + "1.3.9999.99.29", + "p384_mlkem768", + "1.3.9999.99.8", + "x448_mlkem768", + "1.3.9999.99.9", + "x25519_mlkem768", + "1.3.9999.99.10", + "p256_mlkem768", + "1.3.6.1.4.1.22554.5.6.3", + "mlkem1024", + "1.3.9999.99.30", + "p521_mlkem1024", + "1.3.9999.99.32", "bikel1", - "1.3.9999.99.26", + "1.3.9999.99.31", "p256_bikel1", - "1.3.9999.99.8", + "1.3.9999.99.11", "x25519_bikel1", - "1.3.9999.99.29", + "1.3.9999.99.34", "bikel3", - "1.3.9999.99.28", + "1.3.9999.99.33", "p384_bikel3", - "1.3.9999.99.9", + "1.3.9999.99.12", "x448_bikel3", - "1.3.9999.99.31", + "1.3.9999.99.36", "bikel5", - "1.3.9999.99.30", + "1.3.9999.99.35", "p521_bikel5", - "1.3.9999.99.33", + "1.3.9999.99.38", "hqc128", - "1.3.9999.99.32", + "1.3.9999.99.37", "p256_hqc128", - "1.3.9999.99.10", + "1.3.9999.99.13", "x25519_hqc128", - "1.3.9999.99.35", + "1.3.9999.99.40", "hqc192", - "1.3.9999.99.34", + "1.3.9999.99.39", "p384_hqc192", - "1.3.9999.99.11", + "1.3.9999.99.14", "x448_hqc192", - "1.3.9999.99.37", + "1.3.9999.99.42", "hqc256", - "1.3.9999.99.36", + "1.3.9999.99.41", "p521_hqc256", #endif /* OQS_KEM_ENCODERS */ @@ -184,6 +204,20 @@ const char *oqs_oid_alg_list[OQS_OID_CNT] = { "dilithium5_bp384", "2.16.840.1.114027.80.8.1.13", "dilithium5_ed448", + "1.3.6.1.4.1.2.267.12.4.4", + "mldsa44", + "1.3.9999.7.1", + "p256_mldsa44", + "1.3.9999.7.2", + "rsa3072_mldsa44", + "1.3.6.1.4.1.2.267.12.6.5", + "mldsa65", + "1.3.9999.7.3", + "p384_mldsa65", + "1.3.6.1.4.1.2.267.12.8.7", + "mldsa87", + "1.3.9999.7.4", + "p521_mldsa87", "1.3.9999.3.6", "falcon512", "1.3.9999.3.7", @@ -292,46 +326,69 @@ int oqs_patch_oids(void) if (getenv("OQS_OID_P521_KYBER1024")) oqs_oid_alg_list[50] = getenv("OQS_OID_P521_KYBER1024"); + if (getenv("OQS_OID_MLKEM512")) + oqs_oid_alg_list[52] = getenv("OQS_OID_MLKEM512"); + + if (getenv("OQS_OID_P256_MLKEM512")) + oqs_oid_alg_list[54] = getenv("OQS_OID_P256_MLKEM512"); + if (getenv("OQS_OID_X25519_MLKEM512")) + oqs_oid_alg_list[56] = getenv("OQS_OID_X25519_MLKEM512"); + if (getenv("OQS_OID_MLKEM768")) + oqs_oid_alg_list[58] = getenv("OQS_OID_MLKEM768"); + + if (getenv("OQS_OID_P384_MLKEM768")) + oqs_oid_alg_list[60] = getenv("OQS_OID_P384_MLKEM768"); + if (getenv("OQS_OID_X448_MLKEM768")) + oqs_oid_alg_list[62] = getenv("OQS_OID_X448_MLKEM768"); + if (getenv("OQS_OID_X25519_MLKEM768")) + oqs_oid_alg_list[64] = getenv("OQS_OID_X25519_MLKEM768"); + if (getenv("OQS_OID_P256_MLKEM768")) + oqs_oid_alg_list[66] = getenv("OQS_OID_P256_MLKEM768"); + if (getenv("OQS_OID_MLKEM1024")) + oqs_oid_alg_list[68] = getenv("OQS_OID_MLKEM1024"); + + if (getenv("OQS_OID_P521_MLKEM1024")) + oqs_oid_alg_list[70] = getenv("OQS_OID_P521_MLKEM1024"); if (getenv("OQS_OID_BIKEL1")) - oqs_oid_alg_list[52] = getenv("OQS_OID_BIKEL1"); + oqs_oid_alg_list[72] = getenv("OQS_OID_BIKEL1"); if (getenv("OQS_OID_P256_BIKEL1")) - oqs_oid_alg_list[54] = getenv("OQS_OID_P256_BIKEL1"); + oqs_oid_alg_list[74] = getenv("OQS_OID_P256_BIKEL1"); if (getenv("OQS_OID_X25519_BIKEL1")) - oqs_oid_alg_list[56] = getenv("OQS_OID_X25519_BIKEL1"); + oqs_oid_alg_list[76] = getenv("OQS_OID_X25519_BIKEL1"); if (getenv("OQS_OID_BIKEL3")) - oqs_oid_alg_list[58] = getenv("OQS_OID_BIKEL3"); + oqs_oid_alg_list[78] = getenv("OQS_OID_BIKEL3"); if (getenv("OQS_OID_P384_BIKEL3")) - oqs_oid_alg_list[60] = getenv("OQS_OID_P384_BIKEL3"); + oqs_oid_alg_list[80] = getenv("OQS_OID_P384_BIKEL3"); if (getenv("OQS_OID_X448_BIKEL3")) - oqs_oid_alg_list[62] = getenv("OQS_OID_X448_BIKEL3"); + oqs_oid_alg_list[82] = getenv("OQS_OID_X448_BIKEL3"); if (getenv("OQS_OID_BIKEL5")) - oqs_oid_alg_list[64] = getenv("OQS_OID_BIKEL5"); + oqs_oid_alg_list[84] = getenv("OQS_OID_BIKEL5"); if (getenv("OQS_OID_P521_BIKEL5")) - oqs_oid_alg_list[66] = getenv("OQS_OID_P521_BIKEL5"); + oqs_oid_alg_list[86] = getenv("OQS_OID_P521_BIKEL5"); if (getenv("OQS_OID_HQC128")) - oqs_oid_alg_list[68] = getenv("OQS_OID_HQC128"); + oqs_oid_alg_list[88] = getenv("OQS_OID_HQC128"); if (getenv("OQS_OID_P256_HQC128")) - oqs_oid_alg_list[70] = getenv("OQS_OID_P256_HQC128"); + oqs_oid_alg_list[90] = getenv("OQS_OID_P256_HQC128"); if (getenv("OQS_OID_X25519_HQC128")) - oqs_oid_alg_list[72] = getenv("OQS_OID_X25519_HQC128"); + oqs_oid_alg_list[92] = getenv("OQS_OID_X25519_HQC128"); if (getenv("OQS_OID_HQC192")) - oqs_oid_alg_list[74] = getenv("OQS_OID_HQC192"); + oqs_oid_alg_list[94] = getenv("OQS_OID_HQC192"); if (getenv("OQS_OID_P384_HQC192")) - oqs_oid_alg_list[76] = getenv("OQS_OID_P384_HQC192"); + oqs_oid_alg_list[96] = getenv("OQS_OID_P384_HQC192"); if (getenv("OQS_OID_X448_HQC192")) - oqs_oid_alg_list[78] = getenv("OQS_OID_X448_HQC192"); + oqs_oid_alg_list[98] = getenv("OQS_OID_X448_HQC192"); if (getenv("OQS_OID_HQC256")) - oqs_oid_alg_list[80] = getenv("OQS_OID_HQC256"); + oqs_oid_alg_list[100] = getenv("OQS_OID_HQC256"); if (getenv("OQS_OID_P521_HQC256")) - oqs_oid_alg_list[82] = getenv("OQS_OID_P521_HQC256"); + oqs_oid_alg_list[102] = getenv("OQS_OID_P521_HQC256"); -# define OQS_KEMOID_CNT 82 + 2 +# define OQS_KEMOID_CNT 102 + 2 #else # define OQS_KEMOID_CNT 0 #endif /* OQS_KEM_ENCODERS */ @@ -353,51 +410,66 @@ int oqs_patch_oids(void) if (getenv("OQS_OID_P521_DILITHIUM5")) oqs_oid_alg_list[12 + OQS_KEMOID_CNT] = getenv("OQS_OID_P521_DILITHIUM5"); + if (getenv("OQS_OID_MLDSA44")) + oqs_oid_alg_list[14 + OQS_KEMOID_CNT] = getenv("OQS_OID_MLDSA44"); + if (getenv("OQS_OID_P256_MLDSA44")) + oqs_oid_alg_list[16 + OQS_KEMOID_CNT] = getenv("OQS_OID_P256_MLDSA44"); + if (getenv("OQS_OID_RSA3072_MLDSA44")) + oqs_oid_alg_list[18 + OQS_KEMOID_CNT] + = getenv("OQS_OID_RSA3072_MLDSA44"); + if (getenv("OQS_OID_MLDSA65")) + oqs_oid_alg_list[20 + OQS_KEMOID_CNT] = getenv("OQS_OID_MLDSA65"); + if (getenv("OQS_OID_P384_MLDSA65")) + oqs_oid_alg_list[22 + OQS_KEMOID_CNT] = getenv("OQS_OID_P384_MLDSA65"); + if (getenv("OQS_OID_MLDSA87")) + oqs_oid_alg_list[24 + OQS_KEMOID_CNT] = getenv("OQS_OID_MLDSA87"); + if (getenv("OQS_OID_P521_MLDSA87")) + oqs_oid_alg_list[26 + OQS_KEMOID_CNT] = getenv("OQS_OID_P521_MLDSA87"); if (getenv("OQS_OID_FALCON512")) - oqs_oid_alg_list[14 + OQS_KEMOID_CNT] = getenv("OQS_OID_FALCON512"); + oqs_oid_alg_list[28 + OQS_KEMOID_CNT] = getenv("OQS_OID_FALCON512"); if (getenv("OQS_OID_P256_FALCON512")) - oqs_oid_alg_list[16 + OQS_KEMOID_CNT] + oqs_oid_alg_list[30 + OQS_KEMOID_CNT] = getenv("OQS_OID_P256_FALCON512"); if (getenv("OQS_OID_RSA3072_FALCON512")) - oqs_oid_alg_list[18 + OQS_KEMOID_CNT] + oqs_oid_alg_list[32 + OQS_KEMOID_CNT] = getenv("OQS_OID_RSA3072_FALCON512"); if (getenv("OQS_OID_FALCON1024")) - oqs_oid_alg_list[20 + OQS_KEMOID_CNT] = getenv("OQS_OID_FALCON1024"); + oqs_oid_alg_list[34 + OQS_KEMOID_CNT] = getenv("OQS_OID_FALCON1024"); if (getenv("OQS_OID_P521_FALCON1024")) - oqs_oid_alg_list[22 + OQS_KEMOID_CNT] + oqs_oid_alg_list[36 + OQS_KEMOID_CNT] = getenv("OQS_OID_P521_FALCON1024"); if (getenv("OQS_OID_SPHINCSSHA2128FSIMPLE")) - oqs_oid_alg_list[24 + OQS_KEMOID_CNT] + oqs_oid_alg_list[38 + OQS_KEMOID_CNT] = getenv("OQS_OID_SPHINCSSHA2128FSIMPLE"); if (getenv("OQS_OID_P256_SPHINCSSHA2128FSIMPLE")) - oqs_oid_alg_list[26 + OQS_KEMOID_CNT] + oqs_oid_alg_list[40 + OQS_KEMOID_CNT] = getenv("OQS_OID_P256_SPHINCSSHA2128FSIMPLE"); if (getenv("OQS_OID_RSA3072_SPHINCSSHA2128FSIMPLE")) - oqs_oid_alg_list[28 + OQS_KEMOID_CNT] + oqs_oid_alg_list[42 + OQS_KEMOID_CNT] = getenv("OQS_OID_RSA3072_SPHINCSSHA2128FSIMPLE"); if (getenv("OQS_OID_SPHINCSSHA2128SSIMPLE")) - oqs_oid_alg_list[30 + OQS_KEMOID_CNT] + oqs_oid_alg_list[44 + OQS_KEMOID_CNT] = getenv("OQS_OID_SPHINCSSHA2128SSIMPLE"); if (getenv("OQS_OID_P256_SPHINCSSHA2128SSIMPLE")) - oqs_oid_alg_list[32 + OQS_KEMOID_CNT] + oqs_oid_alg_list[46 + OQS_KEMOID_CNT] = getenv("OQS_OID_P256_SPHINCSSHA2128SSIMPLE"); if (getenv("OQS_OID_RSA3072_SPHINCSSHA2128SSIMPLE")) - oqs_oid_alg_list[34 + OQS_KEMOID_CNT] + oqs_oid_alg_list[48 + OQS_KEMOID_CNT] = getenv("OQS_OID_RSA3072_SPHINCSSHA2128SSIMPLE"); if (getenv("OQS_OID_SPHINCSSHA2192FSIMPLE")) - oqs_oid_alg_list[36 + OQS_KEMOID_CNT] + oqs_oid_alg_list[50 + OQS_KEMOID_CNT] = getenv("OQS_OID_SPHINCSSHA2192FSIMPLE"); if (getenv("OQS_OID_P384_SPHINCSSHA2192FSIMPLE")) - oqs_oid_alg_list[38 + OQS_KEMOID_CNT] + oqs_oid_alg_list[52 + OQS_KEMOID_CNT] = getenv("OQS_OID_P384_SPHINCSSHA2192FSIMPLE"); if (getenv("OQS_OID_SPHINCSSHAKE128FSIMPLE")) - oqs_oid_alg_list[40 + OQS_KEMOID_CNT] + oqs_oid_alg_list[54 + OQS_KEMOID_CNT] = getenv("OQS_OID_SPHINCSSHAKE128FSIMPLE"); if (getenv("OQS_OID_P256_SPHINCSSHAKE128FSIMPLE")) - oqs_oid_alg_list[42 + OQS_KEMOID_CNT] + oqs_oid_alg_list[56 + OQS_KEMOID_CNT] = getenv("OQS_OID_P256_SPHINCSSHAKE128FSIMPLE"); if (getenv("OQS_OID_RSA3072_SPHINCSSHAKE128FSIMPLE")) - oqs_oid_alg_list[44 + OQS_KEMOID_CNT] + oqs_oid_alg_list[58 + OQS_KEMOID_CNT] = getenv("OQS_OID_RSA3072_SPHINCSSHAKE128FSIMPLE"); ///// OQS_TEMPLATE_FRAGMENT_OID_PATCHING_END return 1; @@ -506,109 +578,138 @@ int oqs_patch_encodings(void) if (getenv("OQS_ENCODING_DILITHIUM5_ED448_ALGNAME")) oqs_alg_encoding_list[39] = getenv("OQS_ENCODING_DILITHIUM5_ED448_ALGNAME"); + if (getenv("OQS_ENCODING_MLDSA44")) + oqs_alg_encoding_list[40] = getenv("OQS_ENCODING_MLDSA44"); + if (getenv("OQS_ENCODING_MLDSA44_ALGNAME")) + oqs_alg_encoding_list[41] = getenv("OQS_ENCODING_MLDSA44_ALGNAME"); + if (getenv("OQS_ENCODING_P256_MLDSA44")) + oqs_alg_encoding_list[42] = getenv("OQS_ENCODING_P256_MLDSA44"); + if (getenv("OQS_ENCODING_P256_MLDSA44_ALGNAME")) + oqs_alg_encoding_list[43] = getenv("OQS_ENCODING_P256_MLDSA44_ALGNAME"); + if (getenv("OQS_ENCODING_RSA3072_MLDSA44")) + oqs_alg_encoding_list[44] = getenv("OQS_ENCODING_RSA3072_MLDSA44"); + if (getenv("OQS_ENCODING_RSA3072_MLDSA44_ALGNAME")) + oqs_alg_encoding_list[45] + = getenv("OQS_ENCODING_RSA3072_MLDSA44_ALGNAME"); + if (getenv("OQS_ENCODING_MLDSA65")) + oqs_alg_encoding_list[46] = getenv("OQS_ENCODING_MLDSA65"); + if (getenv("OQS_ENCODING_MLDSA65_ALGNAME")) + oqs_alg_encoding_list[47] = getenv("OQS_ENCODING_MLDSA65_ALGNAME"); + if (getenv("OQS_ENCODING_P384_MLDSA65")) + oqs_alg_encoding_list[48] = getenv("OQS_ENCODING_P384_MLDSA65"); + if (getenv("OQS_ENCODING_P384_MLDSA65_ALGNAME")) + oqs_alg_encoding_list[49] = getenv("OQS_ENCODING_P384_MLDSA65_ALGNAME"); + if (getenv("OQS_ENCODING_MLDSA87")) + oqs_alg_encoding_list[50] = getenv("OQS_ENCODING_MLDSA87"); + if (getenv("OQS_ENCODING_MLDSA87_ALGNAME")) + oqs_alg_encoding_list[51] = getenv("OQS_ENCODING_MLDSA87_ALGNAME"); + if (getenv("OQS_ENCODING_P521_MLDSA87")) + oqs_alg_encoding_list[52] = getenv("OQS_ENCODING_P521_MLDSA87"); + if (getenv("OQS_ENCODING_P521_MLDSA87_ALGNAME")) + oqs_alg_encoding_list[53] = getenv("OQS_ENCODING_P521_MLDSA87_ALGNAME"); if (getenv("OQS_ENCODING_FALCON512")) - oqs_alg_encoding_list[40] = getenv("OQS_ENCODING_FALCON512"); + oqs_alg_encoding_list[54] = getenv("OQS_ENCODING_FALCON512"); if (getenv("OQS_ENCODING_FALCON512_ALGNAME")) - oqs_alg_encoding_list[41] = getenv("OQS_ENCODING_FALCON512_ALGNAME"); + oqs_alg_encoding_list[55] = getenv("OQS_ENCODING_FALCON512_ALGNAME"); if (getenv("OQS_ENCODING_P256_FALCON512")) - oqs_alg_encoding_list[42] = getenv("OQS_ENCODING_P256_FALCON512"); + oqs_alg_encoding_list[56] = getenv("OQS_ENCODING_P256_FALCON512"); if (getenv("OQS_ENCODING_P256_FALCON512_ALGNAME")) - oqs_alg_encoding_list[43] + oqs_alg_encoding_list[57] = getenv("OQS_ENCODING_P256_FALCON512_ALGNAME"); if (getenv("OQS_ENCODING_RSA3072_FALCON512")) - oqs_alg_encoding_list[44] = getenv("OQS_ENCODING_RSA3072_FALCON512"); + oqs_alg_encoding_list[58] = getenv("OQS_ENCODING_RSA3072_FALCON512"); if (getenv("OQS_ENCODING_RSA3072_FALCON512_ALGNAME")) - oqs_alg_encoding_list[45] + oqs_alg_encoding_list[59] = getenv("OQS_ENCODING_RSA3072_FALCON512_ALGNAME"); if (getenv("OQS_ENCODING_FALCON512_P256")) - oqs_alg_encoding_list[46] = getenv("OQS_ENCODING_FALCON512_P256"); + oqs_alg_encoding_list[60] = getenv("OQS_ENCODING_FALCON512_P256"); if (getenv("OQS_ENCODING_FALCON512_P256_ALGNAME")) - oqs_alg_encoding_list[47] + oqs_alg_encoding_list[61] = getenv("OQS_ENCODING_FALCON512_P256_ALGNAME"); if (getenv("OQS_ENCODING_FALCON512_BP256")) - oqs_alg_encoding_list[48] = getenv("OQS_ENCODING_FALCON512_BP256"); + oqs_alg_encoding_list[62] = getenv("OQS_ENCODING_FALCON512_BP256"); if (getenv("OQS_ENCODING_FALCON512_BP256_ALGNAME")) - oqs_alg_encoding_list[49] + oqs_alg_encoding_list[63] = getenv("OQS_ENCODING_FALCON512_BP256_ALGNAME"); if (getenv("OQS_ENCODING_FALCON512_ED25519")) - oqs_alg_encoding_list[50] = getenv("OQS_ENCODING_FALCON512_ED25519"); + oqs_alg_encoding_list[64] = getenv("OQS_ENCODING_FALCON512_ED25519"); if (getenv("OQS_ENCODING_FALCON512_ED25519_ALGNAME")) - oqs_alg_encoding_list[51] + oqs_alg_encoding_list[65] = getenv("OQS_ENCODING_FALCON512_ED25519_ALGNAME"); if (getenv("OQS_ENCODING_FALCON1024")) - oqs_alg_encoding_list[52] = getenv("OQS_ENCODING_FALCON1024"); + oqs_alg_encoding_list[66] = getenv("OQS_ENCODING_FALCON1024"); if (getenv("OQS_ENCODING_FALCON1024_ALGNAME")) - oqs_alg_encoding_list[53] = getenv("OQS_ENCODING_FALCON1024_ALGNAME"); + oqs_alg_encoding_list[67] = getenv("OQS_ENCODING_FALCON1024_ALGNAME"); if (getenv("OQS_ENCODING_P521_FALCON1024")) - oqs_alg_encoding_list[54] = getenv("OQS_ENCODING_P521_FALCON1024"); + oqs_alg_encoding_list[68] = getenv("OQS_ENCODING_P521_FALCON1024"); if (getenv("OQS_ENCODING_P521_FALCON1024_ALGNAME")) - oqs_alg_encoding_list[55] + oqs_alg_encoding_list[69] = getenv("OQS_ENCODING_P521_FALCON1024_ALGNAME"); if (getenv("OQS_ENCODING_SPHINCSSHA2128FSIMPLE")) - oqs_alg_encoding_list[56] + oqs_alg_encoding_list[70] = getenv("OQS_ENCODING_SPHINCSSHA2128FSIMPLE"); if (getenv("OQS_ENCODING_SPHINCSSHA2128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[57] + oqs_alg_encoding_list[71] = getenv("OQS_ENCODING_SPHINCSSHA2128FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_P256_SPHINCSSHA2128FSIMPLE")) - oqs_alg_encoding_list[58] + oqs_alg_encoding_list[72] = getenv("OQS_ENCODING_P256_SPHINCSSHA2128FSIMPLE"); if (getenv("OQS_ENCODING_P256_SPHINCSSHA2128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[59] + oqs_alg_encoding_list[73] = getenv("OQS_ENCODING_P256_SPHINCSSHA2128FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128FSIMPLE")) - oqs_alg_encoding_list[60] + oqs_alg_encoding_list[74] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128FSIMPLE"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[61] + oqs_alg_encoding_list[75] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_SPHINCSSHA2128SSIMPLE")) - oqs_alg_encoding_list[62] + oqs_alg_encoding_list[76] = getenv("OQS_ENCODING_SPHINCSSHA2128SSIMPLE"); if (getenv("OQS_ENCODING_SPHINCSSHA2128SSIMPLE_ALGNAME")) - oqs_alg_encoding_list[63] + oqs_alg_encoding_list[77] = getenv("OQS_ENCODING_SPHINCSSHA2128SSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_P256_SPHINCSSHA2128SSIMPLE")) - oqs_alg_encoding_list[64] + oqs_alg_encoding_list[78] = getenv("OQS_ENCODING_P256_SPHINCSSHA2128SSIMPLE"); if (getenv("OQS_ENCODING_P256_SPHINCSSHA2128SSIMPLE_ALGNAME")) - oqs_alg_encoding_list[65] + oqs_alg_encoding_list[79] = getenv("OQS_ENCODING_P256_SPHINCSSHA2128SSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128SSIMPLE")) - oqs_alg_encoding_list[66] + oqs_alg_encoding_list[80] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128SSIMPLE"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128SSIMPLE_ALGNAME")) - oqs_alg_encoding_list[67] + oqs_alg_encoding_list[81] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128SSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_SPHINCSSHA2192FSIMPLE")) - oqs_alg_encoding_list[68] + oqs_alg_encoding_list[82] = getenv("OQS_ENCODING_SPHINCSSHA2192FSIMPLE"); if (getenv("OQS_ENCODING_SPHINCSSHA2192FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[69] + oqs_alg_encoding_list[83] = getenv("OQS_ENCODING_SPHINCSSHA2192FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_P384_SPHINCSSHA2192FSIMPLE")) - oqs_alg_encoding_list[70] + oqs_alg_encoding_list[84] = getenv("OQS_ENCODING_P384_SPHINCSSHA2192FSIMPLE"); if (getenv("OQS_ENCODING_P384_SPHINCSSHA2192FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[71] + oqs_alg_encoding_list[85] = getenv("OQS_ENCODING_P384_SPHINCSSHA2192FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_SPHINCSSHAKE128FSIMPLE")) - oqs_alg_encoding_list[72] + oqs_alg_encoding_list[86] = getenv("OQS_ENCODING_SPHINCSSHAKE128FSIMPLE"); if (getenv("OQS_ENCODING_SPHINCSSHAKE128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[73] + oqs_alg_encoding_list[87] = getenv("OQS_ENCODING_SPHINCSSHAKE128FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_P256_SPHINCSSHAKE128FSIMPLE")) - oqs_alg_encoding_list[74] + oqs_alg_encoding_list[88] = getenv("OQS_ENCODING_P256_SPHINCSSHAKE128FSIMPLE"); if (getenv("OQS_ENCODING_P256_SPHINCSSHAKE128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[75] + oqs_alg_encoding_list[89] = getenv("OQS_ENCODING_P256_SPHINCSSHAKE128FSIMPLE_ALGNAME"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE")) - oqs_alg_encoding_list[76] + oqs_alg_encoding_list[90] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE"); if (getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE_ALGNAME")) - oqs_alg_encoding_list[77] + oqs_alg_encoding_list[91] = getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE_ALGNAME"); ///// OQS_TEMPLATE_FRAGMENT_ENCODING_PATCHING_END return 1; @@ -680,6 +781,19 @@ static const OSSL_ALGORITHM oqsprovider_signatures[] = { SIGALG("dilithium5_bp384", 384, oqs_signature_functions), SIGALG("dilithium5_ed448", 192, oqs_signature_functions), #endif +#ifdef OQS_ENABLE_SIG_ml_dsa_44 + SIGALG("mldsa44", 128, oqs_signature_functions), + SIGALG("p256_mldsa44", 128, oqs_signature_functions), + SIGALG("rsa3072_mldsa44", 128, oqs_signature_functions), +#endif +#ifdef OQS_ENABLE_SIG_ml_dsa_65 + SIGALG("mldsa65", 192, oqs_signature_functions), + SIGALG("p384_mldsa65", 192, oqs_signature_functions), +#endif +#ifdef OQS_ENABLE_SIG_ml_dsa_87 + SIGALG("mldsa87", 256, oqs_signature_functions), + SIGALG("p521_mldsa87", 256, oqs_signature_functions), +#endif #ifdef OQS_ENABLE_SIG_falcon_512 SIGALG("falcon512", 128, oqs_signature_functions), SIGALG("p256_falcon512", 128, oqs_signature_functions), @@ -761,6 +875,22 @@ static const OSSL_ALGORITHM oqsprovider_asym_kems[] = { KEMBASEALG(kyber1024, 256) KEMHYBALG(p521_kyber1024, 256) #endif +#ifdef OQS_ENABLE_KEM_ml_kem_512 + KEMBASEALG(mlkem512, 128) + KEMHYBALG(p256_mlkem512, 128) + KEMHYBALG(x25519_mlkem512, 128) +#endif +#ifdef OQS_ENABLE_KEM_ml_kem_768 + KEMBASEALG(mlkem768, 192) + KEMHYBALG(p384_mlkem768, 192) + KEMHYBALG(x448_mlkem768, 192) + KEMHYBALG(x25519_mlkem768, 128) + KEMHYBALG(p256_mlkem768, 128) +#endif +#ifdef OQS_ENABLE_KEM_ml_kem_1024 + KEMBASEALG(mlkem1024, 256) + KEMHYBALG(p521_mlkem1024, 256) +#endif #ifdef OQS_ENABLE_KEM_bike_l1 KEMBASEALG(bikel1, 128) KEMHYBALG(p256_bikel1, 128) @@ -793,7 +923,8 @@ static const OSSL_ALGORITHM oqsprovider_asym_kems[] = { ///// OQS_TEMPLATE_FRAGMENT_KEM_FUNCTIONS_END {NULL, NULL, NULL}}; -static const OSSL_ALGORITHM oqsprovider_keymgmt[] = { +static const OSSL_ALGORITHM oqsprovider_keymgmt[] + = { ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_FUNCTIONS_START // clang-format off @@ -823,6 +954,19 @@ static const OSSL_ALGORITHM oqsprovider_keymgmt[] = { SIGALG("dilithium5_bp384", 384, oqs_dilithium5_bp384_keymgmt_functions), SIGALG("dilithium5_ed448", 192, oqs_dilithium5_ed448_keymgmt_functions), #endif +#ifdef OQS_ENABLE_SIG_ml_dsa_44 + SIGALG("mldsa44", 128, oqs_mldsa44_keymgmt_functions), + SIGALG("p256_mldsa44", 128, oqs_p256_mldsa44_keymgmt_functions), + SIGALG("rsa3072_mldsa44", 128, oqs_rsa3072_mldsa44_keymgmt_functions), +#endif +#ifdef OQS_ENABLE_SIG_ml_dsa_65 + SIGALG("mldsa65", 192, oqs_mldsa65_keymgmt_functions), + SIGALG("p384_mldsa65", 192, oqs_p384_mldsa65_keymgmt_functions), +#endif +#ifdef OQS_ENABLE_SIG_ml_dsa_87 + SIGALG("mldsa87", 256, oqs_mldsa87_keymgmt_functions), + SIGALG("p521_mldsa87", 256, oqs_p521_mldsa87_keymgmt_functions), +#endif #ifdef OQS_ENABLE_SIG_falcon_512 SIGALG("falcon512", 128, oqs_falcon512_keymgmt_functions), SIGALG("p256_falcon512", 128, oqs_p256_falcon512_keymgmt_functions), @@ -908,6 +1052,25 @@ static const OSSL_ALGORITHM oqsprovider_keymgmt[] = { KEMKMHYBALG(p521_kyber1024, 256, ecp) #endif +#ifdef OQS_ENABLE_KEM_ml_kem_512 + KEMKMALG(mlkem512, 128) + + KEMKMHYBALG(p256_mlkem512, 128, ecp) + KEMKMHYBALG(x25519_mlkem512, 128, ecx) +#endif +#ifdef OQS_ENABLE_KEM_ml_kem_768 + KEMKMALG(mlkem768, 192) + + KEMKMHYBALG(p384_mlkem768, 192, ecp) + KEMKMHYBALG(x448_mlkem768, 192, ecx) + KEMKMHYBALG(x25519_mlkem768, 128, ecx) + KEMKMHYBALG(p256_mlkem768, 128, ecp) +#endif +#ifdef OQS_ENABLE_KEM_ml_kem_1024 + KEMKMALG(mlkem1024, 256) + + KEMKMHYBALG(p521_mlkem1024, 256, ecp) +#endif #ifdef OQS_ENABLE_KEM_bike_l1 KEMKMALG(bikel1, 128) @@ -942,10 +1105,10 @@ static const OSSL_ALGORITHM oqsprovider_keymgmt[] = { KEMKMHYBALG(p521_hqc256, 256, ecp) #endif - // clang-format on - ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_FUNCTIONS_END - // ALG("x25519_sikep434", oqs_ecx_sikep434_keymgmt_functions), - {NULL, NULL, NULL}}; + // clang-format on + ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_FUNCTIONS_END + // ALG("x25519_sikep434", oqs_ecx_sikep434_keymgmt_functions), + {NULL, NULL, NULL}}; static const OSSL_ALGORITHM oqsprovider_encoder[] = { #define ENCODER_PROVIDER "oqsprovider" diff --git a/oqsprov/oqsprov_capabilities.c b/oqsprov/oqsprov_capabilities.c index 6255b041..81aec194 100644 --- a/oqsprov/oqsprov_capabilities.c +++ b/oqsprov/oqsprov_capabilities.c @@ -70,6 +70,19 @@ static OQS_GROUP_CONSTANTS oqs_group_list[] = { {0x023D, 256, TLS1_3_VERSION, 0, -1, -1, 1}, {0x2F3D, 256, TLS1_3_VERSION, 0, -1, -1, 1}, + {0x0247, 128, TLS1_3_VERSION, 0, -1, -1, 1}, + + {0x2F47, 128, TLS1_3_VERSION, 0, -1, -1, 1}, + {0x2FB2, 128, TLS1_3_VERSION, 0, -1, -1, 1}, + {0x0248, 192, TLS1_3_VERSION, 0, -1, -1, 1}, + + {0x2F48, 192, TLS1_3_VERSION, 0, -1, -1, 1}, + {0x2FB3, 192, TLS1_3_VERSION, 0, -1, -1, 1}, + {0x2FB4, 192, TLS1_3_VERSION, 0, -1, -1, 1}, + {0x2FB5, 192, TLS1_3_VERSION, 0, -1, -1, 1}, + {0x0249, 256, TLS1_3_VERSION, 0, -1, -1, 1}, + + {0x2F49, 256, TLS1_3_VERSION, 0, -1, -1, 1}, {0x0241, 128, TLS1_3_VERSION, 0, -1, -1, 1}, {0x2F41, 128, TLS1_3_VERSION, 0, -1, -1, 1}, @@ -184,39 +197,58 @@ static const OSSL_PARAM oqs_param_group_list[][11] = { OQS_GROUP_ENTRY(p521_kyber1024, p521_kyber1024, p521_kyber1024, 25), #endif +#ifdef OQS_ENABLE_KEM_ml_kem_512 + OQS_GROUP_ENTRY(mlkem512, mlkem512, mlkem512, 26), + + OQS_GROUP_ENTRY(p256_mlkem512, p256_mlkem512, p256_mlkem512, 27), + OQS_GROUP_ENTRY(x25519_mlkem512, x25519_mlkem512, x25519_mlkem512, 28), +#endif +#ifdef OQS_ENABLE_KEM_ml_kem_768 + OQS_GROUP_ENTRY(mlkem768, mlkem768, mlkem768, 29), + + OQS_GROUP_ENTRY(p384_mlkem768, p384_mlkem768, p384_mlkem768, 30), + OQS_GROUP_ENTRY(x448_mlkem768, x448_mlkem768, x448_mlkem768, 31), + OQS_GROUP_ENTRY(x25519_mlkem768, x25519_mlkem768, x25519_mlkem768, 32), + OQS_GROUP_ENTRY(p256_mlkem768, p256_mlkem768, p256_mlkem768, 33), +#endif +#ifdef OQS_ENABLE_KEM_ml_kem_1024 + OQS_GROUP_ENTRY(mlkem1024, mlkem1024, mlkem1024, 34), + + OQS_GROUP_ENTRY(p521_mlkem1024, p521_mlkem1024, p521_mlkem1024, 35), +#endif #ifdef OQS_ENABLE_KEM_bike_l1 - OQS_GROUP_ENTRY(bikel1, bikel1, bikel1, 26), + OQS_GROUP_ENTRY(bikel1, bikel1, bikel1, 36), - OQS_GROUP_ENTRY(p256_bikel1, p256_bikel1, p256_bikel1, 27), - OQS_GROUP_ENTRY(x25519_bikel1, x25519_bikel1, x25519_bikel1, 28), + OQS_GROUP_ENTRY(p256_bikel1, p256_bikel1, p256_bikel1, 37), + OQS_GROUP_ENTRY(x25519_bikel1, x25519_bikel1, x25519_bikel1, 38), #endif #ifdef OQS_ENABLE_KEM_bike_l3 - OQS_GROUP_ENTRY(bikel3, bikel3, bikel3, 29), + OQS_GROUP_ENTRY(bikel3, bikel3, bikel3, 39), - OQS_GROUP_ENTRY(p384_bikel3, p384_bikel3, p384_bikel3, 30), - OQS_GROUP_ENTRY(x448_bikel3, x448_bikel3, x448_bikel3, 31), + OQS_GROUP_ENTRY(p384_bikel3, p384_bikel3, p384_bikel3, 40), + OQS_GROUP_ENTRY(x448_bikel3, x448_bikel3, x448_bikel3, 41), #endif #ifdef OQS_ENABLE_KEM_bike_l5 - OQS_GROUP_ENTRY(bikel5, bikel5, bikel5, 32), + OQS_GROUP_ENTRY(bikel5, bikel5, bikel5, 42), - OQS_GROUP_ENTRY(p521_bikel5, p521_bikel5, p521_bikel5, 33), + OQS_GROUP_ENTRY(p521_bikel5, p521_bikel5, p521_bikel5, 43), #endif #ifdef OQS_ENABLE_KEM_hqc_128 - OQS_GROUP_ENTRY(hqc128, hqc128, hqc128, 34), + OQS_GROUP_ENTRY(hqc128, hqc128, hqc128, 44), - OQS_GROUP_ENTRY(p256_hqc128, p256_hqc128, p256_hqc128, 35), - OQS_GROUP_ENTRY(x25519_hqc128, x25519_hqc128, x25519_hqc128, 36), + OQS_GROUP_ENTRY(p256_hqc128, p256_hqc128, p256_hqc128, 45), + OQS_GROUP_ENTRY(x25519_hqc128, x25519_hqc128, x25519_hqc128, 46), #endif #ifdef OQS_ENABLE_KEM_hqc_192 - OQS_GROUP_ENTRY(hqc192, hqc192, hqc192, 37), + OQS_GROUP_ENTRY(hqc192, hqc192, hqc192, 47), - OQS_GROUP_ENTRY(p384_hqc192, p384_hqc192, p384_hqc192, 38), - OQS_GROUP_ENTRY(x448_hqc192, x448_hqc192, x448_hqc192, 39), + OQS_GROUP_ENTRY(p384_hqc192, p384_hqc192, p384_hqc192, 48), + OQS_GROUP_ENTRY(x448_hqc192, x448_hqc192, x448_hqc192, 49), #endif #ifdef OQS_ENABLE_KEM_hqc_256 - OQS_GROUP_ENTRY(hqc256, hqc256, hqc256, 40), + OQS_GROUP_ENTRY(hqc256, hqc256, hqc256, 50), - OQS_GROUP_ENTRY(p521_hqc256, p521_hqc256, p521_hqc256, 41), + OQS_GROUP_ENTRY(p521_hqc256, p521_hqc256, p521_hqc256, 51), #endif ///// OQS_TEMPLATE_FRAGMENT_GROUP_NAMES_END }; @@ -234,15 +266,18 @@ static OQS_SIGALG_CONSTANTS oqs_sigalg_list[] = { {0xfea0, 128, TLS1_3_VERSION, 0}, {0xfea1, 128, TLS1_3_VERSION, 0}, {0xfea2, 128, TLS1_3_VERSION, 0}, {0xfea3, 192, TLS1_3_VERSION, 0}, {0xfea4, 192, TLS1_3_VERSION, 0}, {0xfea5, 256, TLS1_3_VERSION, 0}, - {0xfea6, 256, TLS1_3_VERSION, 0}, {0xfeae, 128, TLS1_3_VERSION, 0}, - {0xfeaf, 128, TLS1_3_VERSION, 0}, {0xfeb0, 128, TLS1_3_VERSION, 0}, - {0xfeb1, 256, TLS1_3_VERSION, 0}, {0xfeb2, 256, TLS1_3_VERSION, 0}, - {0xfeb3, 128, TLS1_3_VERSION, 0}, {0xfeb4, 128, TLS1_3_VERSION, 0}, - {0xfeb5, 128, TLS1_3_VERSION, 0}, {0xfeb6, 128, TLS1_3_VERSION, 0}, - {0xfeb7, 128, TLS1_3_VERSION, 0}, {0xfeb8, 128, TLS1_3_VERSION, 0}, - {0xfeb9, 192, TLS1_3_VERSION, 0}, {0xfeba, 192, TLS1_3_VERSION, 0}, - {0xfec2, 128, TLS1_3_VERSION, 0}, {0xfec3, 128, TLS1_3_VERSION, 0}, - {0xfec4, 128, TLS1_3_VERSION, 0}, + {0xfea6, 256, TLS1_3_VERSION, 0}, {0xfed0, 128, TLS1_3_VERSION, 0}, + {0xfed3, 128, TLS1_3_VERSION, 0}, {0xfed4, 128, TLS1_3_VERSION, 0}, + {0xfed1, 192, TLS1_3_VERSION, 0}, {0xfed5, 192, TLS1_3_VERSION, 0}, + {0xfed2, 256, TLS1_3_VERSION, 0}, {0xfed6, 256, TLS1_3_VERSION, 0}, + {0xfeae, 128, TLS1_3_VERSION, 0}, {0xfeaf, 128, TLS1_3_VERSION, 0}, + {0xfeb0, 128, TLS1_3_VERSION, 0}, {0xfeb1, 256, TLS1_3_VERSION, 0}, + {0xfeb2, 256, TLS1_3_VERSION, 0}, {0xfeb3, 128, TLS1_3_VERSION, 0}, + {0xfeb4, 128, TLS1_3_VERSION, 0}, {0xfeb5, 128, TLS1_3_VERSION, 0}, + {0xfeb6, 128, TLS1_3_VERSION, 0}, {0xfeb7, 128, TLS1_3_VERSION, 0}, + {0xfeb8, 128, TLS1_3_VERSION, 0}, {0xfeb9, 192, TLS1_3_VERSION, 0}, + {0xfeba, 192, TLS1_3_VERSION, 0}, {0xfec2, 128, TLS1_3_VERSION, 0}, + {0xfec3, 128, TLS1_3_VERSION, 0}, {0xfec4, 128, TLS1_3_VERSION, 0}, ///// OQS_TEMPLATE_FRAGMENT_SIGALG_ASSIGNMENTS_END }; @@ -323,40 +358,67 @@ int oqs_patch_codepoints() if (getenv("OQS_CODEPOINT_P521_KYBER1024")) oqs_group_list[25].group_id = atoi(getenv("OQS_CODEPOINT_P521_KYBER1024")); + if (getenv("OQS_CODEPOINT_MLKEM512")) + oqs_group_list[26].group_id = atoi(getenv("OQS_CODEPOINT_MLKEM512")); + if (getenv("OQS_CODEPOINT_P256_MLKEM512")) + oqs_group_list[27].group_id + = atoi(getenv("OQS_CODEPOINT_P256_MLKEM512")); + if (getenv("OQS_CODEPOINT_X25519_MLKEM512")) + oqs_group_list[28].group_id + = atoi(getenv("OQS_CODEPOINT_X25519_MLKEM512")); + if (getenv("OQS_CODEPOINT_MLKEM768")) + oqs_group_list[29].group_id = atoi(getenv("OQS_CODEPOINT_MLKEM768")); + if (getenv("OQS_CODEPOINT_P384_MLKEM768")) + oqs_group_list[30].group_id + = atoi(getenv("OQS_CODEPOINT_P384_MLKEM768")); + if (getenv("OQS_CODEPOINT_X448_MLKEM768")) + oqs_group_list[31].group_id + = atoi(getenv("OQS_CODEPOINT_X448_MLKEM768")); + if (getenv("OQS_CODEPOINT_X25519_MLKEM768")) + oqs_group_list[32].group_id + = atoi(getenv("OQS_CODEPOINT_X25519_MLKEM768")); + if (getenv("OQS_CODEPOINT_P256_MLKEM768")) + oqs_group_list[33].group_id + = atoi(getenv("OQS_CODEPOINT_P256_MLKEM768")); + if (getenv("OQS_CODEPOINT_MLKEM1024")) + oqs_group_list[34].group_id = atoi(getenv("OQS_CODEPOINT_MLKEM1024")); + if (getenv("OQS_CODEPOINT_P521_MLKEM1024")) + oqs_group_list[35].group_id + = atoi(getenv("OQS_CODEPOINT_P521_MLKEM1024")); if (getenv("OQS_CODEPOINT_BIKEL1")) - oqs_group_list[26].group_id = atoi(getenv("OQS_CODEPOINT_BIKEL1")); + oqs_group_list[36].group_id = atoi(getenv("OQS_CODEPOINT_BIKEL1")); if (getenv("OQS_CODEPOINT_P256_BIKEL1")) - oqs_group_list[27].group_id = atoi(getenv("OQS_CODEPOINT_P256_BIKEL1")); + oqs_group_list[37].group_id = atoi(getenv("OQS_CODEPOINT_P256_BIKEL1")); if (getenv("OQS_CODEPOINT_X25519_BIKEL1")) - oqs_group_list[28].group_id + oqs_group_list[38].group_id = atoi(getenv("OQS_CODEPOINT_X25519_BIKEL1")); if (getenv("OQS_CODEPOINT_BIKEL3")) - oqs_group_list[29].group_id = atoi(getenv("OQS_CODEPOINT_BIKEL3")); + oqs_group_list[39].group_id = atoi(getenv("OQS_CODEPOINT_BIKEL3")); if (getenv("OQS_CODEPOINT_P384_BIKEL3")) - oqs_group_list[30].group_id = atoi(getenv("OQS_CODEPOINT_P384_BIKEL3")); + oqs_group_list[40].group_id = atoi(getenv("OQS_CODEPOINT_P384_BIKEL3")); if (getenv("OQS_CODEPOINT_X448_BIKEL3")) - oqs_group_list[31].group_id = atoi(getenv("OQS_CODEPOINT_X448_BIKEL3")); + oqs_group_list[41].group_id = atoi(getenv("OQS_CODEPOINT_X448_BIKEL3")); if (getenv("OQS_CODEPOINT_BIKEL5")) - oqs_group_list[32].group_id = atoi(getenv("OQS_CODEPOINT_BIKEL5")); + oqs_group_list[42].group_id = atoi(getenv("OQS_CODEPOINT_BIKEL5")); if (getenv("OQS_CODEPOINT_P521_BIKEL5")) - oqs_group_list[33].group_id = atoi(getenv("OQS_CODEPOINT_P521_BIKEL5")); + oqs_group_list[43].group_id = atoi(getenv("OQS_CODEPOINT_P521_BIKEL5")); if (getenv("OQS_CODEPOINT_HQC128")) - oqs_group_list[34].group_id = atoi(getenv("OQS_CODEPOINT_HQC128")); + oqs_group_list[44].group_id = atoi(getenv("OQS_CODEPOINT_HQC128")); if (getenv("OQS_CODEPOINT_P256_HQC128")) - oqs_group_list[35].group_id = atoi(getenv("OQS_CODEPOINT_P256_HQC128")); + oqs_group_list[45].group_id = atoi(getenv("OQS_CODEPOINT_P256_HQC128")); if (getenv("OQS_CODEPOINT_X25519_HQC128")) - oqs_group_list[36].group_id + oqs_group_list[46].group_id = atoi(getenv("OQS_CODEPOINT_X25519_HQC128")); if (getenv("OQS_CODEPOINT_HQC192")) - oqs_group_list[37].group_id = atoi(getenv("OQS_CODEPOINT_HQC192")); + oqs_group_list[47].group_id = atoi(getenv("OQS_CODEPOINT_HQC192")); if (getenv("OQS_CODEPOINT_P384_HQC192")) - oqs_group_list[38].group_id = atoi(getenv("OQS_CODEPOINT_P384_HQC192")); + oqs_group_list[48].group_id = atoi(getenv("OQS_CODEPOINT_P384_HQC192")); if (getenv("OQS_CODEPOINT_X448_HQC192")) - oqs_group_list[39].group_id = atoi(getenv("OQS_CODEPOINT_X448_HQC192")); + oqs_group_list[49].group_id = atoi(getenv("OQS_CODEPOINT_X448_HQC192")); if (getenv("OQS_CODEPOINT_HQC256")) - oqs_group_list[40].group_id = atoi(getenv("OQS_CODEPOINT_HQC256")); + oqs_group_list[50].group_id = atoi(getenv("OQS_CODEPOINT_HQC256")); if (getenv("OQS_CODEPOINT_P521_HQC256")) - oqs_group_list[41].group_id = atoi(getenv("OQS_CODEPOINT_P521_HQC256")); + oqs_group_list[51].group_id = atoi(getenv("OQS_CODEPOINT_P521_HQC256")); if (getenv("OQS_CODEPOINT_DILITHIUM2")) oqs_sigalg_list[0].code_point @@ -379,52 +441,71 @@ int oqs_patch_codepoints() if (getenv("OQS_CODEPOINT_P521_DILITHIUM5")) oqs_sigalg_list[6].code_point = atoi(getenv("OQS_CODEPOINT_P521_DILITHIUM5")); + if (getenv("OQS_CODEPOINT_MLDSA44")) + oqs_sigalg_list[7].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA44")); + if (getenv("OQS_CODEPOINT_P256_MLDSA44")) + oqs_sigalg_list[8].code_point + = atoi(getenv("OQS_CODEPOINT_P256_MLDSA44")); + if (getenv("OQS_CODEPOINT_RSA3072_MLDSA44")) + oqs_sigalg_list[9].code_point + = atoi(getenv("OQS_CODEPOINT_RSA3072_MLDSA44")); + if (getenv("OQS_CODEPOINT_MLDSA65")) + oqs_sigalg_list[10].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA65")); + if (getenv("OQS_CODEPOINT_P384_MLDSA65")) + oqs_sigalg_list[11].code_point + = atoi(getenv("OQS_CODEPOINT_P384_MLDSA65")); + if (getenv("OQS_CODEPOINT_MLDSA87")) + oqs_sigalg_list[12].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA87")); + if (getenv("OQS_CODEPOINT_P521_MLDSA87")) + oqs_sigalg_list[13].code_point + = atoi(getenv("OQS_CODEPOINT_P521_MLDSA87")); if (getenv("OQS_CODEPOINT_FALCON512")) - oqs_sigalg_list[7].code_point = atoi(getenv("OQS_CODEPOINT_FALCON512")); + oqs_sigalg_list[14].code_point + = atoi(getenv("OQS_CODEPOINT_FALCON512")); if (getenv("OQS_CODEPOINT_P256_FALCON512")) - oqs_sigalg_list[8].code_point + oqs_sigalg_list[15].code_point = atoi(getenv("OQS_CODEPOINT_P256_FALCON512")); if (getenv("OQS_CODEPOINT_RSA3072_FALCON512")) - oqs_sigalg_list[9].code_point + oqs_sigalg_list[16].code_point = atoi(getenv("OQS_CODEPOINT_RSA3072_FALCON512")); if (getenv("OQS_CODEPOINT_FALCON1024")) - oqs_sigalg_list[10].code_point + oqs_sigalg_list[17].code_point = atoi(getenv("OQS_CODEPOINT_FALCON1024")); if (getenv("OQS_CODEPOINT_P521_FALCON1024")) - oqs_sigalg_list[11].code_point + oqs_sigalg_list[18].code_point = atoi(getenv("OQS_CODEPOINT_P521_FALCON1024")); if (getenv("OQS_CODEPOINT_SPHINCSSHA2128FSIMPLE")) - oqs_sigalg_list[12].code_point + oqs_sigalg_list[19].code_point = atoi(getenv("OQS_CODEPOINT_SPHINCSSHA2128FSIMPLE")); if (getenv("OQS_CODEPOINT_P256_SPHINCSSHA2128FSIMPLE")) - oqs_sigalg_list[13].code_point + oqs_sigalg_list[20].code_point = atoi(getenv("OQS_CODEPOINT_P256_SPHINCSSHA2128FSIMPLE")); if (getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHA2128FSIMPLE")) - oqs_sigalg_list[14].code_point + oqs_sigalg_list[21].code_point = atoi(getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHA2128FSIMPLE")); if (getenv("OQS_CODEPOINT_SPHINCSSHA2128SSIMPLE")) - oqs_sigalg_list[15].code_point + oqs_sigalg_list[22].code_point = atoi(getenv("OQS_CODEPOINT_SPHINCSSHA2128SSIMPLE")); if (getenv("OQS_CODEPOINT_P256_SPHINCSSHA2128SSIMPLE")) - oqs_sigalg_list[16].code_point + oqs_sigalg_list[23].code_point = atoi(getenv("OQS_CODEPOINT_P256_SPHINCSSHA2128SSIMPLE")); if (getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHA2128SSIMPLE")) - oqs_sigalg_list[17].code_point + oqs_sigalg_list[24].code_point = atoi(getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHA2128SSIMPLE")); if (getenv("OQS_CODEPOINT_SPHINCSSHA2192FSIMPLE")) - oqs_sigalg_list[18].code_point + oqs_sigalg_list[25].code_point = atoi(getenv("OQS_CODEPOINT_SPHINCSSHA2192FSIMPLE")); if (getenv("OQS_CODEPOINT_P384_SPHINCSSHA2192FSIMPLE")) - oqs_sigalg_list[19].code_point + oqs_sigalg_list[26].code_point = atoi(getenv("OQS_CODEPOINT_P384_SPHINCSSHA2192FSIMPLE")); if (getenv("OQS_CODEPOINT_SPHINCSSHAKE128FSIMPLE")) - oqs_sigalg_list[20].code_point + oqs_sigalg_list[27].code_point = atoi(getenv("OQS_CODEPOINT_SPHINCSSHAKE128FSIMPLE")); if (getenv("OQS_CODEPOINT_P256_SPHINCSSHAKE128FSIMPLE")) - oqs_sigalg_list[21].code_point + oqs_sigalg_list[28].code_point = atoi(getenv("OQS_CODEPOINT_P256_SPHINCSSHAKE128FSIMPLE")); if (getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHAKE128FSIMPLE")) - oqs_sigalg_list[22].code_point + oqs_sigalg_list[29].code_point = atoi(getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHAKE128FSIMPLE")); ///// OQS_TEMPLATE_FRAGMENT_CODEPOINT_PATCHING_END return 1; @@ -486,50 +567,67 @@ static const OSSL_PARAM oqs_param_sigalg_list[][12] = { OQS_SIGALG_ENTRY(p521_dilithium5, p521_dilithium5, p521_dilithium5, "1.3.9999.2.7.4", 6), # endif +# ifdef OQS_ENABLE_SIG_ml_dsa_44 + OQS_SIGALG_ENTRY(mldsa44, mldsa44, mldsa44, "1.3.6.1.4.1.2.267.12.4.4", 7), + OQS_SIGALG_ENTRY(p256_mldsa44, p256_mldsa44, p256_mldsa44, "1.3.9999.7.1", + 8), + OQS_SIGALG_ENTRY(rsa3072_mldsa44, rsa3072_mldsa44, rsa3072_mldsa44, + "1.3.9999.7.2", 9), +# endif +# ifdef OQS_ENABLE_SIG_ml_dsa_65 + OQS_SIGALG_ENTRY(mldsa65, mldsa65, mldsa65, "1.3.6.1.4.1.2.267.12.6.5", 10), + OQS_SIGALG_ENTRY(p384_mldsa65, p384_mldsa65, p384_mldsa65, "1.3.9999.7.3", + 11), +# endif +# ifdef OQS_ENABLE_SIG_ml_dsa_87 + OQS_SIGALG_ENTRY(mldsa87, mldsa87, mldsa87, "1.3.6.1.4.1.2.267.12.8.7", 12), + OQS_SIGALG_ENTRY(p521_mldsa87, p521_mldsa87, p521_mldsa87, "1.3.9999.7.4", + 13), +# endif # ifdef OQS_ENABLE_SIG_falcon_512 - OQS_SIGALG_ENTRY(falcon512, falcon512, falcon512, "1.3.9999.3.6", 7), + OQS_SIGALG_ENTRY(falcon512, falcon512, falcon512, "1.3.9999.3.6", 14), OQS_SIGALG_ENTRY(p256_falcon512, p256_falcon512, p256_falcon512, - "1.3.9999.3.7", 8), + "1.3.9999.3.7", 15), OQS_SIGALG_ENTRY(rsa3072_falcon512, rsa3072_falcon512, rsa3072_falcon512, - "1.3.9999.3.8", 9), + "1.3.9999.3.8", 16), # endif # ifdef OQS_ENABLE_SIG_falcon_1024 - OQS_SIGALG_ENTRY(falcon1024, falcon1024, falcon1024, "1.3.9999.3.9", 10), + OQS_SIGALG_ENTRY(falcon1024, falcon1024, falcon1024, "1.3.9999.3.9", 17), OQS_SIGALG_ENTRY(p521_falcon1024, p521_falcon1024, p521_falcon1024, - "1.3.9999.3.10", 11), + "1.3.9999.3.10", 18), # endif # ifdef OQS_ENABLE_SIG_sphincs_sha2_128f_simple OQS_SIGALG_ENTRY(sphincssha2128fsimple, sphincssha2128fsimple, - sphincssha2128fsimple, "1.3.9999.6.4.13", 12), + sphincssha2128fsimple, "1.3.9999.6.4.13", 19), OQS_SIGALG_ENTRY(p256_sphincssha2128fsimple, p256_sphincssha2128fsimple, - p256_sphincssha2128fsimple, "1.3.9999.6.4.14", 13), + p256_sphincssha2128fsimple, "1.3.9999.6.4.14", 20), OQS_SIGALG_ENTRY(rsa3072_sphincssha2128fsimple, rsa3072_sphincssha2128fsimple, - rsa3072_sphincssha2128fsimple, "1.3.9999.6.4.15", 14), + rsa3072_sphincssha2128fsimple, "1.3.9999.6.4.15", 21), # endif # ifdef OQS_ENABLE_SIG_sphincs_sha2_128s_simple OQS_SIGALG_ENTRY(sphincssha2128ssimple, sphincssha2128ssimple, - sphincssha2128ssimple, "1.3.9999.6.4.16", 15), + sphincssha2128ssimple, "1.3.9999.6.4.16", 22), OQS_SIGALG_ENTRY(p256_sphincssha2128ssimple, p256_sphincssha2128ssimple, - p256_sphincssha2128ssimple, "1.3.9999.6.4.17", 16), + p256_sphincssha2128ssimple, "1.3.9999.6.4.17", 23), OQS_SIGALG_ENTRY(rsa3072_sphincssha2128ssimple, rsa3072_sphincssha2128ssimple, - rsa3072_sphincssha2128ssimple, "1.3.9999.6.4.18", 17), + rsa3072_sphincssha2128ssimple, "1.3.9999.6.4.18", 24), # endif # ifdef OQS_ENABLE_SIG_sphincs_sha2_192f_simple OQS_SIGALG_ENTRY(sphincssha2192fsimple, sphincssha2192fsimple, - sphincssha2192fsimple, "1.3.9999.6.5.10", 18), + sphincssha2192fsimple, "1.3.9999.6.5.10", 25), OQS_SIGALG_ENTRY(p384_sphincssha2192fsimple, p384_sphincssha2192fsimple, - p384_sphincssha2192fsimple, "1.3.9999.6.5.11", 19), + p384_sphincssha2192fsimple, "1.3.9999.6.5.11", 26), # endif # ifdef OQS_ENABLE_SIG_sphincs_shake_128f_simple OQS_SIGALG_ENTRY(sphincsshake128fsimple, sphincsshake128fsimple, - sphincsshake128fsimple, "1.3.9999.6.7.13", 20), + sphincsshake128fsimple, "1.3.9999.6.7.13", 27), OQS_SIGALG_ENTRY(p256_sphincsshake128fsimple, p256_sphincsshake128fsimple, - p256_sphincsshake128fsimple, "1.3.9999.6.7.14", 21), + p256_sphincsshake128fsimple, "1.3.9999.6.7.14", 28), OQS_SIGALG_ENTRY(rsa3072_sphincsshake128fsimple, rsa3072_sphincsshake128fsimple, - rsa3072_sphincsshake128fsimple, "1.3.9999.6.7.15", 22), + rsa3072_sphincsshake128fsimple, "1.3.9999.6.7.15", 29), # endif ///// OQS_TEMPLATE_FRAGMENT_SIGALG_NAMES_END }; diff --git a/oqsprov/oqsprov_keys.c b/oqsprov/oqsprov_keys.c index 357f4d44..9384a347 100644 --- a/oqsprov/oqsprov_keys.c +++ b/oqsprov/oqsprov_keys.c @@ -54,9 +54,9 @@ static int oqsx_key_recreate_classickey(OQSX_KEY *key, oqsx_key_op_t op); ///// OQS_TEMPLATE_FRAGMENT_OQSNAMES_START #ifdef OQS_KEM_ENCODERS -# define NID_TABLE_LEN 81 +# define NID_TABLE_LEN 88 #else -# define NID_TABLE_LEN 39 +# define NID_TABLE_LEN 46 #endif static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { @@ -98,6 +98,16 @@ static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { {0, "p256_kyber768", OQS_KEM_alg_kyber_768, KEY_TYPE_ECP_HYB_KEM, 192}, {0, "kyber1024", OQS_KEM_alg_kyber_1024, KEY_TYPE_KEM, 256}, {0, "p521_kyber1024", OQS_KEM_alg_kyber_1024, KEY_TYPE_ECP_HYB_KEM, 256}, + {0, "mlkem512", OQS_KEM_alg_ml_kem_512, KEY_TYPE_KEM, 128}, + {0, "p256_mlkem512", OQS_KEM_alg_ml_kem_512, KEY_TYPE_ECP_HYB_KEM, 128}, + {0, "x25519_mlkem512", OQS_KEM_alg_ml_kem_512, KEY_TYPE_ECX_HYB_KEM, 128}, + {0, "mlkem768", OQS_KEM_alg_ml_kem_768, KEY_TYPE_KEM, 192}, + {0, "p384_mlkem768", OQS_KEM_alg_ml_kem_768, KEY_TYPE_ECP_HYB_KEM, 192}, + {0, "x448_mlkem768", OQS_KEM_alg_ml_kem_768, KEY_TYPE_ECX_HYB_KEM, 192}, + {0, "x25519_mlkem768", OQS_KEM_alg_ml_kem_768, KEY_TYPE_ECX_HYB_KEM, 192}, + {0, "p256_mlkem768", OQS_KEM_alg_ml_kem_768, KEY_TYPE_ECP_HYB_KEM, 192}, + {0, "mlkem1024", OQS_KEM_alg_ml_kem_1024, KEY_TYPE_KEM, 256}, + {0, "p521_mlkem1024", OQS_KEM_alg_ml_kem_1024, KEY_TYPE_ECP_HYB_KEM, 256}, {0, "bikel1", OQS_KEM_alg_bike_l1, KEY_TYPE_KEM, 128}, {0, "p256_bikel1", OQS_KEM_alg_bike_l1, KEY_TYPE_ECP_HYB_KEM, 128}, {0, "x25519_bikel1", OQS_KEM_alg_bike_l1, KEY_TYPE_ECX_HYB_KEM, 128}, @@ -136,6 +146,13 @@ static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { {0, "dilithium5_p384", OQS_SIG_alg_dilithium_5, KEY_TYPE_CMP_SIG, 192}, {0, "dilithium5_bp384", OQS_SIG_alg_dilithium_5, KEY_TYPE_CMP_SIG, 384}, {0, "dilithium5_ed448", OQS_SIG_alg_dilithium_5, KEY_TYPE_CMP_SIG, 192}, + {0, "mldsa44", OQS_SIG_alg_ml_dsa_44, KEY_TYPE_SIG, 128}, + {0, "p256_mldsa44", OQS_SIG_alg_ml_dsa_44, KEY_TYPE_HYB_SIG, 128}, + {0, "rsa3072_mldsa44", OQS_SIG_alg_ml_dsa_44, KEY_TYPE_HYB_SIG, 128}, + {0, "mldsa65", OQS_SIG_alg_ml_dsa_65, KEY_TYPE_SIG, 192}, + {0, "p384_mldsa65", OQS_SIG_alg_ml_dsa_65, KEY_TYPE_HYB_SIG, 192}, + {0, "mldsa87", OQS_SIG_alg_ml_dsa_87, KEY_TYPE_SIG, 256}, + {0, "p521_mldsa87", OQS_SIG_alg_ml_dsa_87, KEY_TYPE_HYB_SIG, 256}, {0, "falcon512", OQS_SIG_alg_falcon_512, KEY_TYPE_SIG, 128}, {0, "p256_falcon512", OQS_SIG_alg_falcon_512, KEY_TYPE_HYB_SIG, 128}, {0, "rsa3072_falcon512", OQS_SIG_alg_falcon_512, KEY_TYPE_HYB_SIG, 128}, diff --git a/scripts/common.py b/scripts/common.py index 88c609e5..d146c8d3 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -7,27 +7,33 @@ key_exchanges = [ ##### OQS_TEMPLATE_FRAGMENT_KEX_ALGS_START # post-quantum key exchanges - 'frodo640aes','frodo640shake','frodo976aes','frodo976shake','frodo1344aes','frodo1344shake','kyber512','kyber768','kyber1024','bikel1','bikel3','bikel5','hqc128','hqc192','hqc256', + 'frodo640aes','frodo640shake','frodo976aes','frodo976shake','frodo1344aes','frodo1344shake','kyber512','kyber768','kyber1024','mlkem512','mlkem768','mlkem1024','bikel1','bikel3','bikel5','hqc128','hqc192','hqc256', # post-quantum + classical key exchanges - 'p256_frodo640aes','x25519_frodo640aes','p256_frodo640shake','x25519_frodo640shake','p384_frodo976aes','x448_frodo976aes','p384_frodo976shake','x448_frodo976shake','p521_frodo1344aes','p521_frodo1344shake','p256_kyber512','x25519_kyber512','p384_kyber768','x448_kyber768','x25519_kyber768','p256_kyber768','p521_kyber1024','p256_bikel1','x25519_bikel1','p384_bikel3','x448_bikel3','p521_bikel5','p256_hqc128','x25519_hqc128','p384_hqc192','x448_hqc192','p521_hqc256', + 'p256_frodo640aes','x25519_frodo640aes','p256_frodo640shake','x25519_frodo640shake','p384_frodo976aes','x448_frodo976aes','p384_frodo976shake','x448_frodo976shake','p521_frodo1344aes','p521_frodo1344shake','p256_kyber512','x25519_kyber512','p384_kyber768','x448_kyber768','x25519_kyber768','p256_kyber768','p521_kyber1024','p256_mlkem512','x25519_mlkem512','p384_mlkem768','x448_mlkem768','x25519_mlkem768','p256_mlkem768','p521_mlkem1024','p256_bikel1','x25519_bikel1','p384_bikel3','x448_bikel3','p521_bikel5','p256_hqc128','x25519_hqc128','p384_hqc192','x448_hqc192','p521_hqc256', ##### OQS_TEMPLATE_FRAGMENT_KEX_ALGS_END ] signatures = [ 'ecdsap256', 'rsa3072', ##### OQS_TEMPLATE_FRAGMENT_SIG_ALGS_START # post-quantum signatures - 'dilithium2','dilithium3','dilithium5','falcon512','falcon1024','sphincssha2128fsimple','sphincssha2128ssimple','sphincssha2192fsimple','sphincsshake128fsimple', + 'dilithium2','dilithium3','dilithium5','mldsa44','mldsa65','mldsa87','falcon512','falcon1024','sphincssha2128fsimple','sphincssha2128ssimple','sphincssha2192fsimple','sphincsshake128fsimple', # post-quantum + classical signatures - 'p256_dilithium2','rsa3072_dilithium2','p384_dilithium3','p521_dilithium5','p256_falcon512','rsa3072_falcon512','p521_falcon1024','p256_sphincssha2128fsimple','rsa3072_sphincssha2128fsimple','p256_sphincssha2128ssimple','rsa3072_sphincssha2128ssimple','p384_sphincssha2192fsimple','p256_sphincsshake128fsimple','rsa3072_sphincsshake128fsimple', + 'p256_dilithium2','rsa3072_dilithium2','p384_dilithium3','p521_dilithium5','p256_mldsa44','rsa3072_mldsa44','p384_mldsa65','p521_mldsa87','p256_falcon512','rsa3072_falcon512','p521_falcon1024','p256_sphincssha2128fsimple','rsa3072_sphincssha2128fsimple','p256_sphincssha2128ssimple','rsa3072_sphincssha2128ssimple','p384_sphincssha2192fsimple','p256_sphincsshake128fsimple','rsa3072_sphincsshake128fsimple', # post-quantum + classical signatures (COMPOSITE) 'dilithium2_pss2048','dilithium2_rsa2048','dilithium2_ed25519','dilithium2_p256','dilithium2_bp256','dilithium3_pss3072','dilithium3_rsa3072','dilithium3_p256','dilithium3_bp256','dilithium3_ed25519','dilithium5_p384','dilithium5_bp384','dilithium5_ed448','falcon512_p256','falcon512_bp256','falcon512_ed25519',##### OQS_TEMPLATE_FRAGMENT_SIG_ALGS_END ] SERVER_START_ATTEMPTS = 10 -def all_pq_groups(): +def all_pq_groups(first = 0): ag = "" - for kex in key_exchanges: + half = len(key_exchanges)//2 + if (first == 0): + kexs = key_exchanges[:half] + else: + kexs = key_exchanges[half:] + + for kex in kexs: if len(ag)==0: ag = kex else: @@ -57,7 +63,7 @@ def run_subprocess(command, working_dir='.', expected_returncode=0, input=None, assert False, "Got unexpected return code {}".format(result.returncode) return result.stdout.decode('utf-8') -def start_server(ossl, test_artifacts_dir, sig_alg, worker_id): +def start_server(ossl, test_artifacts_dir, sig_alg, worker_id, first): command = [ossl, 's_server', '-cert', os.path.join(test_artifacts_dir, '{}_{}_srv.crt'.format(worker_id, sig_alg)), '-key', os.path.join(test_artifacts_dir, '{}_{}_srv.key'.format(worker_id, sig_alg)), @@ -65,7 +71,7 @@ def start_server(ossl, test_artifacts_dir, sig_alg, worker_id): '-tls1_3', '-quiet', # add X25519 for baseline server test and all PQ KEMs for single PQ KEM tests: - '-groups', "x25519:"+all_pq_groups(), + '-groups', "x25519:"+all_pq_groups(first), # On UNIX-like systems, binding to TCP port 0 # is a request to dynamically generate an unused # port number. @@ -84,7 +90,8 @@ def start_server(ossl, test_artifacts_dir, sig_alg, worker_id): break else: server_start_attempt += 1 - time.sleep(2) + # be more lenient for slow CI servers + time.sleep(1) server_port = str(server_info.connections()[0].laddr.port) # Check SERVER_START_ATTEMPTS times to see @@ -99,7 +106,8 @@ def start_server(ossl, test_artifacts_dir, sig_alg, worker_id): break else: server_start_attempt += 1 - time.sleep(2) + # be more lenient for slow CI servers + time.sleep(1) if server_start_attempt > SERVER_START_ATTEMPTS: raise Exception('Cannot start OpenSSL server') diff --git a/scripts/release-test-ci.sh b/scripts/release-test-ci.sh index 62a9ea02..2c0ac819 100755 --- a/scripts/release-test-ci.sh +++ b/scripts/release-test-ci.sh @@ -23,7 +23,7 @@ if [ -d oqs-template ]; then sed -i "s/enable\: false/enable\: true/g" oqs-template/generate.yml python3 oqs-template/generate.py ./scripts/fullbuild.sh - ./scripts/runtests.sh + ./scripts/runtests.sh -V if [ -f .local/bin/openssl ]; then OPENSSL_MODULES=`pwd`/_build/lib OPENSSL_CONF=`pwd`/scripts/openssl-ca.cnf python3 -m pytest --numprocesses=auto scripts/test_tls_full.py else diff --git a/scripts/test_tls_full.py b/scripts/test_tls_full.py index a1639140..a91a76cc 100644 --- a/scripts/test_tls_full.py +++ b/scripts/test_tls_full.py @@ -3,23 +3,50 @@ import sys import os +# OK, I admit I don't understand this fixture/parameterization stuff +# What I do understand is that openssl crashes when running with too many key_exchange algs +# hence this crude hack to do two tests with half the KEXs each +# XXX anyone better at Python/pytest please improve this! + +@pytest.fixture(params=common.signatures) +def server0(ossl, ossl_config, test_artifacts_dir, request, worker_id): + # Setup: start ossl server + common.gen_keys(ossl, ossl_config, request.param, test_artifacts_dir, worker_id) + server, port = common.start_server(ossl, test_artifacts_dir, request.param, worker_id, 0) + # Run tests + yield (request.param, port) + # Teardown: stop ossl server + server.kill() + @pytest.fixture(params=common.signatures) -def server(ossl, ossl_config, test_artifacts_dir, request, worker_id): +def server1(ossl, ossl_config, test_artifacts_dir, request, worker_id): # Setup: start ossl server common.gen_keys(ossl, ossl_config, request.param, test_artifacts_dir, worker_id) - server, port = common.start_server(ossl, test_artifacts_dir, request.param, worker_id) + server, port = common.start_server(ossl, test_artifacts_dir, request.param, worker_id, 1) # Run tests yield (request.param, port) # Teardown: stop ossl server server.kill() -@pytest.mark.parametrize('kex_name', common.key_exchanges) -def test_sig_kem_pair(ossl, server, test_artifacts_dir, kex_name, worker_id): +@pytest.mark.parametrize('kex_name', common.key_exchanges[:len(common.key_exchanges)//2]) +def test_sig_kem_pair(ossl, server0, test_artifacts_dir, kex_name, worker_id): + client_output = common.run_subprocess([ossl, 's_client', + '-groups', kex_name, + '-CAfile', os.path.join(test_artifacts_dir, '{}_{}_CA.crt'.format(worker_id, server0[0])), + '-verify_return_error', + '-connect', 'localhost:{}'.format(server0[1])], + input='Q'.encode()) +# OpenSSL3 by default does not output KEM used; so rely on forced client group and OK handshake completion: + if not "SSL handshake has read" in client_output: + assert False, "Handshake failure." + +@pytest.mark.parametrize('kex_name', common.key_exchanges[len(common.key_exchanges)//2:]) +def test_sig_kem_pair(ossl, server1, test_artifacts_dir, kex_name, worker_id): client_output = common.run_subprocess([ossl, 's_client', '-groups', kex_name, - '-CAfile', os.path.join(test_artifacts_dir, '{}_{}_CA.crt'.format(worker_id, server[0])), + '-CAfile', os.path.join(test_artifacts_dir, '{}_{}_CA.crt'.format(worker_id, server1[0])), '-verify_return_error', - '-connect', 'localhost:{}'.format(server[1])], + '-connect', 'localhost:{}'.format(server1[1])], input='Q'.encode()) # OpenSSL3 by default does not output KEM used; so rely on forced client group and OK handshake completion: if not "SSL handshake has read" in client_output: