diff --git a/ALGORITHMS.md b/ALGORITHMS.md index da839eef..f5979e47 100644 --- a/ALGORITHMS.md +++ b/ALGORITHMS.md @@ -65,13 +65,13 @@ As standardization for these algorithms within TLS is not done, all TLS code poi | x448_hqc192 | 0x2FB1 | Yes | OQS_CODEPOINT_X448_HQC192 | | hqc256 | 0x0246 | Yes | OQS_CODEPOINT_HQC256 | | p521_hqc256 | 0x2F46 | Yes | OQS_CODEPOINT_P521_HQC256 | -| dilithium2 | 0xfea0 |Yes| OQS_CODEPOINT_DILITHIUM2 -| p256_dilithium2 | 0xfea1 |Yes| OQS_CODEPOINT_P256_DILITHIUM2 -| rsa3072_dilithium2 | 0xfea2 |Yes| OQS_CODEPOINT_RSA3072_DILITHIUM2 -| dilithium3 | 0xfea3 |Yes| OQS_CODEPOINT_DILITHIUM3 -| p384_dilithium3 | 0xfea4 |Yes| OQS_CODEPOINT_P384_DILITHIUM3 -| dilithium5 | 0xfea5 |Yes| OQS_CODEPOINT_DILITHIUM5 -| p521_dilithium5 | 0xfea6 |Yes| OQS_CODEPOINT_P521_DILITHIUM5 +| dilithium2 | 0xfea0 |No| OQS_CODEPOINT_DILITHIUM2 +| p256_dilithium2 | 0xfea1 |No| OQS_CODEPOINT_P256_DILITHIUM2 +| rsa3072_dilithium2 | 0xfea2 |No| OQS_CODEPOINT_RSA3072_DILITHIUM2 +| dilithium3 | 0xfea3 |No| OQS_CODEPOINT_DILITHIUM3 +| p384_dilithium3 | 0xfea4 |No| OQS_CODEPOINT_P384_DILITHIUM3 +| dilithium5 | 0xfea5 |No| OQS_CODEPOINT_DILITHIUM5 +| p521_dilithium5 | 0xfea6 |No| 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 @@ -89,23 +89,23 @@ As standardization for these algorithms within TLS is not done, all TLS code poi | p521_falcon1024 | 0xfedb |Yes| OQS_CODEPOINT_P521_FALCON1024 | falconpadded1024 | 0xfedf |Yes| OQS_CODEPOINT_FALCONPADDED1024 | p521_falconpadded1024 | 0xfee0 |Yes| OQS_CODEPOINT_P521_FALCONPADDED1024 -| sphincssha2128fsimple | 0xfeb3 |Yes| OQS_CODEPOINT_SPHINCSSHA2128FSIMPLE -| p256_sphincssha2128fsimple | 0xfeb4 |Yes| OQS_CODEPOINT_P256_SPHINCSSHA2128FSIMPLE -| rsa3072_sphincssha2128fsimple | 0xfeb5 |Yes| OQS_CODEPOINT_RSA3072_SPHINCSSHA2128FSIMPLE -| sphincssha2128ssimple | 0xfeb6 |Yes| OQS_CODEPOINT_SPHINCSSHA2128SSIMPLE -| p256_sphincssha2128ssimple | 0xfeb7 |Yes| OQS_CODEPOINT_P256_SPHINCSSHA2128SSIMPLE -| rsa3072_sphincssha2128ssimple | 0xfeb8 |Yes| OQS_CODEPOINT_RSA3072_SPHINCSSHA2128SSIMPLE -| sphincssha2192fsimple | 0xfeb9 |Yes| OQS_CODEPOINT_SPHINCSSHA2192FSIMPLE -| p384_sphincssha2192fsimple | 0xfeba |Yes| OQS_CODEPOINT_P384_SPHINCSSHA2192FSIMPLE +| sphincssha2128fsimple | 0xfeb3 |No| OQS_CODEPOINT_SPHINCSSHA2128FSIMPLE +| p256_sphincssha2128fsimple | 0xfeb4 |No| OQS_CODEPOINT_P256_SPHINCSSHA2128FSIMPLE +| rsa3072_sphincssha2128fsimple | 0xfeb5 |No| OQS_CODEPOINT_RSA3072_SPHINCSSHA2128FSIMPLE +| sphincssha2128ssimple | 0xfeb6 |No| OQS_CODEPOINT_SPHINCSSHA2128SSIMPLE +| p256_sphincssha2128ssimple | 0xfeb7 |No| OQS_CODEPOINT_P256_SPHINCSSHA2128SSIMPLE +| rsa3072_sphincssha2128ssimple | 0xfeb8 |No| OQS_CODEPOINT_RSA3072_SPHINCSSHA2128SSIMPLE +| sphincssha2192fsimple | 0xfeb9 |No| OQS_CODEPOINT_SPHINCSSHA2192FSIMPLE +| p384_sphincssha2192fsimple | 0xfeba |No| OQS_CODEPOINT_P384_SPHINCSSHA2192FSIMPLE | sphincssha2192ssimple | 0xfebb |No| OQS_CODEPOINT_SPHINCSSHA2192SSIMPLE | p384_sphincssha2192ssimple | 0xfebc |No| OQS_CODEPOINT_P384_SPHINCSSHA2192SSIMPLE | sphincssha2256fsimple | 0xfebd |No| OQS_CODEPOINT_SPHINCSSHA2256FSIMPLE | p521_sphincssha2256fsimple | 0xfebe |No| OQS_CODEPOINT_P521_SPHINCSSHA2256FSIMPLE | sphincssha2256ssimple | 0xfec0 |No| OQS_CODEPOINT_SPHINCSSHA2256SSIMPLE | p521_sphincssha2256ssimple | 0xfec1 |No| OQS_CODEPOINT_P521_SPHINCSSHA2256SSIMPLE -| sphincsshake128fsimple | 0xfec2 |Yes| OQS_CODEPOINT_SPHINCSSHAKE128FSIMPLE -| p256_sphincsshake128fsimple | 0xfec3 |Yes| OQS_CODEPOINT_P256_SPHINCSSHAKE128FSIMPLE -| rsa3072_sphincsshake128fsimple | 0xfec4 |Yes| OQS_CODEPOINT_RSA3072_SPHINCSSHAKE128FSIMPLE +| sphincsshake128fsimple | 0xfec2 |No| OQS_CODEPOINT_SPHINCSSHAKE128FSIMPLE +| p256_sphincsshake128fsimple | 0xfec3 |No| OQS_CODEPOINT_P256_SPHINCSSHAKE128FSIMPLE +| rsa3072_sphincsshake128fsimple | 0xfec4 |No| OQS_CODEPOINT_RSA3072_SPHINCSSHAKE128FSIMPLE | sphincsshake128ssimple | 0xfec5 |No| OQS_CODEPOINT_SPHINCSSHAKE128SSIMPLE | p256_sphincsshake128ssimple | 0xfec6 |No| OQS_CODEPOINT_P256_SPHINCSSHAKE128SSIMPLE | rsa3072_sphincsshake128ssimple | 0xfec7 |No| OQS_CODEPOINT_RSA3072_SPHINCSSHAKE128SSIMPLE @@ -142,13 +142,13 @@ adapting the OIDs of all supported signature algorithms as per the table below. |Algorithm name | default OID | enabled | environment variable | |---------------|:-----------------:|:-------:|----------------------| -| dilithium2 | 1.3.6.1.4.1.2.267.7.4.4 |Yes| OQS_OID_DILITHIUM2 -| p256_dilithium2 | 1.3.9999.2.7.1 |Yes| OQS_OID_P256_DILITHIUM2 -| rsa3072_dilithium2 | 1.3.9999.2.7.2 |Yes| OQS_OID_RSA3072_DILITHIUM2 -| dilithium3 | 1.3.6.1.4.1.2.267.7.6.5 |Yes| OQS_OID_DILITHIUM3 -| p384_dilithium3 | 1.3.9999.2.7.3 |Yes| OQS_OID_P384_DILITHIUM3 -| dilithium5 | 1.3.6.1.4.1.2.267.7.8.7 |Yes| OQS_OID_DILITHIUM5 -| p521_dilithium5 | 1.3.9999.2.7.4 |Yes| OQS_OID_P521_DILITHIUM5 +| dilithium2 | 1.3.6.1.4.1.2.267.7.4.4 |No| OQS_OID_DILITHIUM2 +| p256_dilithium2 | 1.3.9999.2.7.1 |No| OQS_OID_P256_DILITHIUM2 +| rsa3072_dilithium2 | 1.3.9999.2.7.2 |No| OQS_OID_RSA3072_DILITHIUM2 +| dilithium3 | 1.3.6.1.4.1.2.267.7.6.5 |No| OQS_OID_DILITHIUM3 +| p384_dilithium3 | 1.3.9999.2.7.3 |No| OQS_OID_P384_DILITHIUM3 +| dilithium5 | 1.3.6.1.4.1.2.267.7.8.7 |No| OQS_OID_DILITHIUM5 +| p521_dilithium5 | 1.3.9999.2.7.4 |No| OQS_OID_P521_DILITHIUM5 | 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 @@ -179,23 +179,23 @@ adapting the OIDs of all supported signature algorithms as per the table below. | p521_falcon1024 | 1.3.9999.3.15 |Yes| OQS_OID_P521_FALCON1024 | falconpadded1024 | 1.3.9999.3.19 |Yes| OQS_OID_FALCONPADDED1024 | p521_falconpadded1024 | 1.3.9999.3.20 |Yes| OQS_OID_P521_FALCONPADDED1024 -| sphincssha2128fsimple | 1.3.9999.6.4.13 |Yes| OQS_OID_SPHINCSSHA2128FSIMPLE -| p256_sphincssha2128fsimple | 1.3.9999.6.4.14 |Yes| OQS_OID_P256_SPHINCSSHA2128FSIMPLE -| rsa3072_sphincssha2128fsimple | 1.3.9999.6.4.15 |Yes| OQS_OID_RSA3072_SPHINCSSHA2128FSIMPLE -| sphincssha2128ssimple | 1.3.9999.6.4.16 |Yes| OQS_OID_SPHINCSSHA2128SSIMPLE -| p256_sphincssha2128ssimple | 1.3.9999.6.4.17 |Yes| OQS_OID_P256_SPHINCSSHA2128SSIMPLE -| rsa3072_sphincssha2128ssimple | 1.3.9999.6.4.18 |Yes| OQS_OID_RSA3072_SPHINCSSHA2128SSIMPLE -| sphincssha2192fsimple | 1.3.9999.6.5.10 |Yes| OQS_OID_SPHINCSSHA2192FSIMPLE -| p384_sphincssha2192fsimple | 1.3.9999.6.5.11 |Yes| OQS_OID_P384_SPHINCSSHA2192FSIMPLE +| sphincssha2128fsimple | 1.3.9999.6.4.13 |No| OQS_OID_SPHINCSSHA2128FSIMPLE +| p256_sphincssha2128fsimple | 1.3.9999.6.4.14 |No| OQS_OID_P256_SPHINCSSHA2128FSIMPLE +| rsa3072_sphincssha2128fsimple | 1.3.9999.6.4.15 |No| OQS_OID_RSA3072_SPHINCSSHA2128FSIMPLE +| sphincssha2128ssimple | 1.3.9999.6.4.16 |No| OQS_OID_SPHINCSSHA2128SSIMPLE +| p256_sphincssha2128ssimple | 1.3.9999.6.4.17 |No| OQS_OID_P256_SPHINCSSHA2128SSIMPLE +| rsa3072_sphincssha2128ssimple | 1.3.9999.6.4.18 |No| OQS_OID_RSA3072_SPHINCSSHA2128SSIMPLE +| sphincssha2192fsimple | 1.3.9999.6.5.10 |No| OQS_OID_SPHINCSSHA2192FSIMPLE +| p384_sphincssha2192fsimple | 1.3.9999.6.5.11 |No| OQS_OID_P384_SPHINCSSHA2192FSIMPLE | sphincssha2192ssimple | 1.3.9999.6.5.12 |No| OQS_OID_SPHINCSSHA2192SSIMPLE | p384_sphincssha2192ssimple | 1.3.9999.6.5.13 |No| OQS_OID_P384_SPHINCSSHA2192SSIMPLE | sphincssha2256fsimple | 1.3.9999.6.6.10 |No| OQS_OID_SPHINCSSHA2256FSIMPLE | p521_sphincssha2256fsimple | 1.3.9999.6.6.11 |No| OQS_OID_P521_SPHINCSSHA2256FSIMPLE | sphincssha2256ssimple | 1.3.9999.6.6.12 |No| OQS_OID_SPHINCSSHA2256SSIMPLE | p521_sphincssha2256ssimple | 1.3.9999.6.6.13 |No| OQS_OID_P521_SPHINCSSHA2256SSIMPLE -| sphincsshake128fsimple | 1.3.9999.6.7.13 |Yes| OQS_OID_SPHINCSSHAKE128FSIMPLE -| p256_sphincsshake128fsimple | 1.3.9999.6.7.14 |Yes| OQS_OID_P256_SPHINCSSHAKE128FSIMPLE -| rsa3072_sphincsshake128fsimple | 1.3.9999.6.7.15 |Yes| OQS_OID_RSA3072_SPHINCSSHAKE128FSIMPLE +| sphincsshake128fsimple | 1.3.9999.6.7.13 |No| OQS_OID_SPHINCSSHAKE128FSIMPLE +| p256_sphincsshake128fsimple | 1.3.9999.6.7.14 |No| OQS_OID_P256_SPHINCSSHAKE128FSIMPLE +| rsa3072_sphincsshake128fsimple | 1.3.9999.6.7.15 |No| OQS_OID_RSA3072_SPHINCSSHAKE128FSIMPLE | sphincsshake128ssimple | 1.3.9999.6.7.16 |No| OQS_OID_SPHINCSSHAKE128SSIMPLE | p256_sphincsshake128ssimple | 1.3.9999.6.7.17 |No| OQS_OID_P256_SPHINCSSHAKE128SSIMPLE | rsa3072_sphincsshake128ssimple | 1.3.9999.6.7.18 |No| OQS_OID_RSA3072_SPHINCSSHAKE128SSIMPLE diff --git a/README.md b/README.md index 9f58f618..9cd5ab2c 100644 --- a/README.md +++ b/README.md @@ -45,12 +45,12 @@ This implementation makes available the following quantum safe algorithms: ### Signature algorithms -- **CRYSTALS-Dilithium**:`dilithium2`\*, `p256_dilithium2`\*, `rsa3072_dilithium2`\*, `dilithium3`\*, `p384_dilithium3`\*, `dilithium5`\*, `p521_dilithium5`\* +- **CRYSTALS-Dilithium**:`dilithium2`, `p256_dilithium2`, `rsa3072_dilithium2`, `dilithium3`, `p384_dilithium3`, `dilithium5`, `p521_dilithium5` - **ML-DSA**:`mldsa44`\*, `p256_mldsa44`\*, `rsa3072_mldsa44`\*, `mldsa44_pss2048`\*, `mldsa44_rsa2048`\*, `mldsa44_ed25519`\*, `mldsa44_p256`\*, `mldsa44_bp256`\*, `mldsa65`\*, `p384_mldsa65`\*, `mldsa65_pss3072`\*, `mldsa65_rsa3072`\*, `mldsa65_p256`\*, `mldsa65_bp256`\*, `mldsa65_ed25519`\*, `mldsa87`\*, `p521_mldsa87`\*, `mldsa87_p384`\*, `mldsa87_bp384`\*, `mldsa87_ed448`\* - **Falcon**:`falcon512`\*, `p256_falcon512`\*, `rsa3072_falcon512`\*, `falconpadded512`\*, `p256_falconpadded512`\*, `rsa3072_falconpadded512`\*, `falcon1024`\*, `p521_falcon1024`\*, `falconpadded1024`\*, `p521_falconpadded1024`\* -- **SPHINCS-SHA2**:`sphincssha2128fsimple`\*, `p256_sphincssha2128fsimple`\*, `rsa3072_sphincssha2128fsimple`\*, `sphincssha2128ssimple`\*, `p256_sphincssha2128ssimple`\*, `rsa3072_sphincssha2128ssimple`\*, `sphincssha2192fsimple`\*, `p384_sphincssha2192fsimple`\*, `sphincssha2192ssimple`, `p384_sphincssha2192ssimple`, `sphincssha2256fsimple`, `p521_sphincssha2256fsimple`, `sphincssha2256ssimple`, `p521_sphincssha2256ssimple` -- **SPHINCS-SHAKE**:`sphincsshake128fsimple`\*, `p256_sphincsshake128fsimple`\*, `rsa3072_sphincsshake128fsimple`\*, `sphincsshake128ssimple`, `p256_sphincsshake128ssimple`, `rsa3072_sphincsshake128ssimple`, `sphincsshake192fsimple`, `p384_sphincsshake192fsimple`, `sphincsshake192ssimple`, `p384_sphincsshake192ssimple`, `sphincsshake256fsimple`, `p521_sphincsshake256fsimple`, `sphincsshake256ssimple`, `p521_sphincsshake256ssimple` +- **SPHINCS-SHA2**:`sphincssha2128fsimple`, `p256_sphincssha2128fsimple`, `rsa3072_sphincssha2128fsimple`, `sphincssha2128ssimple`, `p256_sphincssha2128ssimple`, `rsa3072_sphincssha2128ssimple`, `sphincssha2192fsimple`, `p384_sphincssha2192fsimple`, `sphincssha2192ssimple`, `p384_sphincssha2192ssimple`, `sphincssha2256fsimple`, `p521_sphincssha2256fsimple`, `sphincssha2256ssimple`, `p521_sphincssha2256ssimple` +- **SPHINCS-SHAKE**:`sphincsshake128fsimple`, `p256_sphincsshake128fsimple`, `rsa3072_sphincsshake128fsimple`, `sphincsshake128ssimple`, `p256_sphincsshake128ssimple`, `rsa3072_sphincsshake128ssimple`, `sphincsshake192fsimple`, `p384_sphincsshake192fsimple`, `sphincsshake192ssimple`, `p384_sphincsshake192ssimple`, `sphincsshake256fsimple`, `p521_sphincsshake256fsimple`, `sphincsshake256ssimple`, `p521_sphincsshake256ssimple` diff --git a/oqs-template/generate.yml b/oqs-template/generate.yml index a0b9e230..ef928d0b 100644 --- a/oqs-template/generate.yml +++ b/oqs-template/generate.yml @@ -414,7 +414,7 @@ sigs: # oqs_meth: 'OQS_SIG_alg_default' # oid: '1.3.9999.1.1' # code_point: '0xfe00' - # enable: true + # enable: false # mix_with: [{'name': 'p256', # 'pretty_name': 'ECDSA p256', # 'oid': '1.3.9999.1.2', @@ -466,7 +466,7 @@ sigs: oid: '1.3.6.1.4.1.2.267.7.4.4' code_point: '0xfea0' supported_encodings: ['draft-uni-qsckeys-dilithium-00/sk-pk'] - enable: true + enable: false mix_with: [{'name': 'p256', 'pretty_name': 'ECDSA p256', 'oid': '1.3.9999.2.7.1', @@ -482,7 +482,7 @@ sigs: oid: '1.3.6.1.4.1.2.267.7.6.5' code_point: '0xfea3' supported_encodings: ['draft-uni-qsckeys-dilithium-00/sk-pk'] - enable: true + enable: false mix_with: [{'name': 'p384', 'pretty_name': 'ECDSA p384', 'oid': '1.3.9999.2.7.3', @@ -494,7 +494,7 @@ sigs: oid: '1.3.6.1.4.1.2.267.7.8.7' code_point: '0xfea5' supported_encodings: ['draft-uni-qsckeys-dilithium-00/sk-pk'] - enable: true + enable: false mix_with: [{'name': 'p521', 'pretty_name': 'ECDSA p521', 'oid': '1.3.9999.2.7.4', @@ -988,7 +988,7 @@ sigs: oid: '1.3.9999.6.4.13' code_point: '0xfeb3' supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk'] - enable: true + enable: false mix_with: [{'name': 'p256', 'pretty_name': 'ECDSA p256', 'oid': '1.3.9999.6.4.14', @@ -1038,7 +1038,7 @@ sigs: oid: '1.3.9999.6.4.16' code_point: '0xfeb6' supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk'] - enable: true + enable: false mix_with: [{'name': 'p256', 'pretty_name': 'ECDSA p256', 'oid': '1.3.9999.6.4.17', @@ -1084,7 +1084,7 @@ sigs: oid: '1.3.9999.6.5.10' code_point: '0xfeb9' supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk'] - enable: true + enable: false mix_with: [{'name': 'p384', 'pretty_name': 'ECDSA p384', 'oid': '1.3.9999.6.5.11', @@ -1243,7 +1243,7 @@ sigs: oid: '1.3.9999.6.7.13' code_point: '0xfec2' supported_encodings: ['draft-uni-qsckeys-sphincsplus-00/sk-pk'] - enable: true + enable: false mix_with: [{'name': 'p256', 'pretty_name': 'ECDSA p256', 'oid': '1.3.9999.6.7.14', diff --git a/oqsprov/oqs_decode_der2key.c b/oqsprov/oqs_decode_der2key.c index 99093ffa..5bf5ede0 100644 --- a/oqsprov/oqs_decode_der2key.c +++ b/oqsprov/oqs_decode_der2key.c @@ -689,21 +689,6 @@ MAKE_DECODER(_ecp, "p521_hqc256", p521_hqc256, oqsx, PrivateKeyInfo); MAKE_DECODER(_ecp, "p521_hqc256", p521_hqc256, oqsx, SubjectPublicKeyInfo); #endif /* OQS_KEM_ENCODERS */ -MAKE_DECODER(, "dilithium2", dilithium2, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium2", dilithium2, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "p256_dilithium2", p256_dilithium2, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "p256_dilithium2", p256_dilithium2, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "rsa3072_dilithium2", rsa3072_dilithium2, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "rsa3072_dilithium2", rsa3072_dilithium2, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium3", dilithium3, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium3", dilithium3, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "p384_dilithium3", p384_dilithium3, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "p384_dilithium3", p384_dilithium3, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "dilithium5", dilithium5, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "dilithium5", dilithium5, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "p521_dilithium5", p521_dilithium5, oqsx, PrivateKeyInfo); -MAKE_DECODER(, "p521_dilithium5", p521_dilithium5, oqsx, SubjectPublicKeyInfo); MAKE_DECODER(, "mldsa44", mldsa44, oqsx, PrivateKeyInfo); MAKE_DECODER(, "mldsa44", mldsa44, oqsx, SubjectPublicKeyInfo); MAKE_DECODER(, "p256_mldsa44", p256_mldsa44, oqsx, PrivateKeyInfo); @@ -772,48 +757,4 @@ MAKE_DECODER(, "p521_falconpadded1024", p521_falconpadded1024, oqsx, PrivateKeyInfo); MAKE_DECODER(, "p521_falconpadded1024", p521_falconpadded1024, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "sphincssha2128fsimple", sphincssha2128fsimple, oqsx, - PrivateKeyInfo); -MAKE_DECODER(, "sphincssha2128fsimple", sphincssha2128fsimple, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "p256_sphincssha2128fsimple", p256_sphincssha2128fsimple, oqsx, - PrivateKeyInfo); -MAKE_DECODER(, "p256_sphincssha2128fsimple", p256_sphincssha2128fsimple, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "rsa3072_sphincssha2128fsimple", rsa3072_sphincssha2128fsimple, - oqsx, PrivateKeyInfo); -MAKE_DECODER(, "rsa3072_sphincssha2128fsimple", rsa3072_sphincssha2128fsimple, - oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "sphincssha2128ssimple", sphincssha2128ssimple, oqsx, - PrivateKeyInfo); -MAKE_DECODER(, "sphincssha2128ssimple", sphincssha2128ssimple, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "p256_sphincssha2128ssimple", p256_sphincssha2128ssimple, oqsx, - PrivateKeyInfo); -MAKE_DECODER(, "p256_sphincssha2128ssimple", p256_sphincssha2128ssimple, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "rsa3072_sphincssha2128ssimple", rsa3072_sphincssha2128ssimple, - oqsx, PrivateKeyInfo); -MAKE_DECODER(, "rsa3072_sphincssha2128ssimple", rsa3072_sphincssha2128ssimple, - oqsx, SubjectPublicKeyInfo); -MAKE_DECODER(, "sphincssha2192fsimple", sphincssha2192fsimple, oqsx, - PrivateKeyInfo); -MAKE_DECODER(, "sphincssha2192fsimple", sphincssha2192fsimple, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "p384_sphincssha2192fsimple", p384_sphincssha2192fsimple, oqsx, - PrivateKeyInfo); -MAKE_DECODER(, "p384_sphincssha2192fsimple", p384_sphincssha2192fsimple, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "sphincsshake128fsimple", sphincsshake128fsimple, oqsx, - PrivateKeyInfo); -MAKE_DECODER(, "sphincsshake128fsimple", sphincsshake128fsimple, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "p256_sphincsshake128fsimple", p256_sphincsshake128fsimple, oqsx, - PrivateKeyInfo); -MAKE_DECODER(, "p256_sphincsshake128fsimple", p256_sphincsshake128fsimple, oqsx, - SubjectPublicKeyInfo); -MAKE_DECODER(, "rsa3072_sphincsshake128fsimple", rsa3072_sphincsshake128fsimple, - oqsx, PrivateKeyInfo); -MAKE_DECODER(, "rsa3072_sphincsshake128fsimple", rsa3072_sphincsshake128fsimple, - oqsx, SubjectPublicKeyInfo); ///// OQS_TEMPLATE_FRAGMENT_DECODER_MAKE_END diff --git a/oqsprov/oqs_encode_key2any.c b/oqsprov/oqs_encode_key2any.c index b06e6138..af152eec 100644 --- a/oqsprov/oqs_encode_key2any.c +++ b/oqsprov/oqs_encode_key2any.c @@ -1126,151 +1126,96 @@ static int oqsx_pki_priv_to_der(const void *vxkey, unsigned char **pder) #define p521_hqc256_input_type "p521_hqc256" #define p521_hqc256_pem_type "p521_hqc256" -#define dilithium2_evp_type 0 -#define dilithium2_input_type "dilithium2" -#define dilithium2_pem_type "dilithium2" -#define p256_dilithium2_evp_type 0 -#define p256_dilithium2_input_type "p256_dilithium2" -#define p256_dilithium2_pem_type "p256_dilithium2" -#define rsa3072_dilithium2_evp_type 0 -#define rsa3072_dilithium2_input_type "rsa3072_dilithium2" -#define rsa3072_dilithium2_pem_type "rsa3072_dilithium2" -#define dilithium3_evp_type 0 -#define dilithium3_input_type "dilithium3" -#define dilithium3_pem_type "dilithium3" -#define p384_dilithium3_evp_type 0 -#define p384_dilithium3_input_type "p384_dilithium3" -#define p384_dilithium3_pem_type "p384_dilithium3" -#define dilithium5_evp_type 0 -#define dilithium5_input_type "dilithium5" -#define dilithium5_pem_type "dilithium5" -#define p521_dilithium5_evp_type 0 -#define p521_dilithium5_input_type "p521_dilithium5" -#define p521_dilithium5_pem_type "p521_dilithium5" -#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 mldsa44_pss2048_evp_type 0 -#define mldsa44_pss2048_input_type "mldsa44_pss2048" -#define mldsa44_pss2048_pem_type "mldsa44_pss2048" -#define mldsa44_rsa2048_evp_type 0 -#define mldsa44_rsa2048_input_type "mldsa44_rsa2048" -#define mldsa44_rsa2048_pem_type "mldsa44_rsa2048" -#define mldsa44_ed25519_evp_type 0 -#define mldsa44_ed25519_input_type "mldsa44_ed25519" -#define mldsa44_ed25519_pem_type "mldsa44_ed25519" -#define mldsa44_p256_evp_type 0 -#define mldsa44_p256_input_type "mldsa44_p256" -#define mldsa44_p256_pem_type "mldsa44_p256" -#define mldsa44_bp256_evp_type 0 -#define mldsa44_bp256_input_type "mldsa44_bp256" -#define mldsa44_bp256_pem_type "mldsa44_bp256" -#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 mldsa65_pss3072_evp_type 0 -#define mldsa65_pss3072_input_type "mldsa65_pss3072" -#define mldsa65_pss3072_pem_type "mldsa65_pss3072" -#define mldsa65_rsa3072_evp_type 0 -#define mldsa65_rsa3072_input_type "mldsa65_rsa3072" -#define mldsa65_rsa3072_pem_type "mldsa65_rsa3072" -#define mldsa65_p256_evp_type 0 -#define mldsa65_p256_input_type "mldsa65_p256" -#define mldsa65_p256_pem_type "mldsa65_p256" -#define mldsa65_bp256_evp_type 0 -#define mldsa65_bp256_input_type "mldsa65_bp256" -#define mldsa65_bp256_pem_type "mldsa65_bp256" -#define mldsa65_ed25519_evp_type 0 -#define mldsa65_ed25519_input_type "mldsa65_ed25519" -#define mldsa65_ed25519_pem_type "mldsa65_ed25519" -#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 mldsa87_p384_evp_type 0 -#define mldsa87_p384_input_type "mldsa87_p384" -#define mldsa87_p384_pem_type "mldsa87_p384" -#define mldsa87_bp384_evp_type 0 -#define mldsa87_bp384_input_type "mldsa87_bp384" -#define mldsa87_bp384_pem_type "mldsa87_bp384" -#define mldsa87_ed448_evp_type 0 -#define mldsa87_ed448_input_type "mldsa87_ed448" -#define mldsa87_ed448_pem_type "mldsa87_ed448" -#define falcon512_evp_type 0 -#define falcon512_input_type "falcon512" -#define falcon512_pem_type "falcon512" -#define p256_falcon512_evp_type 0 -#define p256_falcon512_input_type "p256_falcon512" -#define p256_falcon512_pem_type "p256_falcon512" -#define rsa3072_falcon512_evp_type 0 -#define rsa3072_falcon512_input_type "rsa3072_falcon512" -#define rsa3072_falcon512_pem_type "rsa3072_falcon512" -#define falconpadded512_evp_type 0 -#define falconpadded512_input_type "falconpadded512" -#define falconpadded512_pem_type "falconpadded512" -#define p256_falconpadded512_evp_type 0 -#define p256_falconpadded512_input_type "p256_falconpadded512" -#define p256_falconpadded512_pem_type "p256_falconpadded512" -#define rsa3072_falconpadded512_evp_type 0 -#define rsa3072_falconpadded512_input_type "rsa3072_falconpadded512" -#define rsa3072_falconpadded512_pem_type "rsa3072_falconpadded512" -#define falcon1024_evp_type 0 -#define falcon1024_input_type "falcon1024" -#define falcon1024_pem_type "falcon1024" -#define p521_falcon1024_evp_type 0 -#define p521_falcon1024_input_type "p521_falcon1024" -#define p521_falcon1024_pem_type "p521_falcon1024" -#define falconpadded1024_evp_type 0 -#define falconpadded1024_input_type "falconpadded1024" -#define falconpadded1024_pem_type "falconpadded1024" -#define p521_falconpadded1024_evp_type 0 -#define p521_falconpadded1024_input_type "p521_falconpadded1024" -#define p521_falconpadded1024_pem_type "p521_falconpadded1024" -#define sphincssha2128fsimple_evp_type 0 -#define sphincssha2128fsimple_input_type "sphincssha2128fsimple" -#define sphincssha2128fsimple_pem_type "sphincssha2128fsimple" -#define p256_sphincssha2128fsimple_evp_type 0 -#define p256_sphincssha2128fsimple_input_type "p256_sphincssha2128fsimple" -#define p256_sphincssha2128fsimple_pem_type "p256_sphincssha2128fsimple" -#define rsa3072_sphincssha2128fsimple_evp_type 0 -#define rsa3072_sphincssha2128fsimple_input_type "rsa3072_sphincssha2128fsimple" -#define rsa3072_sphincssha2128fsimple_pem_type "rsa3072_sphincssha2128fsimple" -#define sphincssha2128ssimple_evp_type 0 -#define sphincssha2128ssimple_input_type "sphincssha2128ssimple" -#define sphincssha2128ssimple_pem_type "sphincssha2128ssimple" -#define p256_sphincssha2128ssimple_evp_type 0 -#define p256_sphincssha2128ssimple_input_type "p256_sphincssha2128ssimple" -#define p256_sphincssha2128ssimple_pem_type "p256_sphincssha2128ssimple" -#define rsa3072_sphincssha2128ssimple_evp_type 0 -#define rsa3072_sphincssha2128ssimple_input_type "rsa3072_sphincssha2128ssimple" -#define rsa3072_sphincssha2128ssimple_pem_type "rsa3072_sphincssha2128ssimple" -#define sphincssha2192fsimple_evp_type 0 -#define sphincssha2192fsimple_input_type "sphincssha2192fsimple" -#define sphincssha2192fsimple_pem_type "sphincssha2192fsimple" -#define p384_sphincssha2192fsimple_evp_type 0 -#define p384_sphincssha2192fsimple_input_type "p384_sphincssha2192fsimple" -#define p384_sphincssha2192fsimple_pem_type "p384_sphincssha2192fsimple" -#define sphincsshake128fsimple_evp_type 0 -#define sphincsshake128fsimple_input_type "sphincsshake128fsimple" -#define sphincsshake128fsimple_pem_type "sphincsshake128fsimple" -#define p256_sphincsshake128fsimple_evp_type 0 -#define p256_sphincsshake128fsimple_input_type "p256_sphincsshake128fsimple" -#define p256_sphincsshake128fsimple_pem_type "p256_sphincsshake128fsimple" -#define rsa3072_sphincsshake128fsimple_evp_type 0 -#define rsa3072_sphincsshake128fsimple_input_type \ - "rsa3072_sphincsshake128fsimple" -#define rsa3072_sphincsshake128fsimple_pem_type "rsa3072_sphincsshake128fsimple" +#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 mldsa44_pss2048_evp_type 0 +#define mldsa44_pss2048_input_type "mldsa44_pss2048" +#define mldsa44_pss2048_pem_type "mldsa44_pss2048" +#define mldsa44_rsa2048_evp_type 0 +#define mldsa44_rsa2048_input_type "mldsa44_rsa2048" +#define mldsa44_rsa2048_pem_type "mldsa44_rsa2048" +#define mldsa44_ed25519_evp_type 0 +#define mldsa44_ed25519_input_type "mldsa44_ed25519" +#define mldsa44_ed25519_pem_type "mldsa44_ed25519" +#define mldsa44_p256_evp_type 0 +#define mldsa44_p256_input_type "mldsa44_p256" +#define mldsa44_p256_pem_type "mldsa44_p256" +#define mldsa44_bp256_evp_type 0 +#define mldsa44_bp256_input_type "mldsa44_bp256" +#define mldsa44_bp256_pem_type "mldsa44_bp256" +#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 mldsa65_pss3072_evp_type 0 +#define mldsa65_pss3072_input_type "mldsa65_pss3072" +#define mldsa65_pss3072_pem_type "mldsa65_pss3072" +#define mldsa65_rsa3072_evp_type 0 +#define mldsa65_rsa3072_input_type "mldsa65_rsa3072" +#define mldsa65_rsa3072_pem_type "mldsa65_rsa3072" +#define mldsa65_p256_evp_type 0 +#define mldsa65_p256_input_type "mldsa65_p256" +#define mldsa65_p256_pem_type "mldsa65_p256" +#define mldsa65_bp256_evp_type 0 +#define mldsa65_bp256_input_type "mldsa65_bp256" +#define mldsa65_bp256_pem_type "mldsa65_bp256" +#define mldsa65_ed25519_evp_type 0 +#define mldsa65_ed25519_input_type "mldsa65_ed25519" +#define mldsa65_ed25519_pem_type "mldsa65_ed25519" +#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 mldsa87_p384_evp_type 0 +#define mldsa87_p384_input_type "mldsa87_p384" +#define mldsa87_p384_pem_type "mldsa87_p384" +#define mldsa87_bp384_evp_type 0 +#define mldsa87_bp384_input_type "mldsa87_bp384" +#define mldsa87_bp384_pem_type "mldsa87_bp384" +#define mldsa87_ed448_evp_type 0 +#define mldsa87_ed448_input_type "mldsa87_ed448" +#define mldsa87_ed448_pem_type "mldsa87_ed448" +#define falcon512_evp_type 0 +#define falcon512_input_type "falcon512" +#define falcon512_pem_type "falcon512" +#define p256_falcon512_evp_type 0 +#define p256_falcon512_input_type "p256_falcon512" +#define p256_falcon512_pem_type "p256_falcon512" +#define rsa3072_falcon512_evp_type 0 +#define rsa3072_falcon512_input_type "rsa3072_falcon512" +#define rsa3072_falcon512_pem_type "rsa3072_falcon512" +#define falconpadded512_evp_type 0 +#define falconpadded512_input_type "falconpadded512" +#define falconpadded512_pem_type "falconpadded512" +#define p256_falconpadded512_evp_type 0 +#define p256_falconpadded512_input_type "p256_falconpadded512" +#define p256_falconpadded512_pem_type "p256_falconpadded512" +#define rsa3072_falconpadded512_evp_type 0 +#define rsa3072_falconpadded512_input_type "rsa3072_falconpadded512" +#define rsa3072_falconpadded512_pem_type "rsa3072_falconpadded512" +#define falcon1024_evp_type 0 +#define falcon1024_input_type "falcon1024" +#define falcon1024_pem_type "falcon1024" +#define p521_falcon1024_evp_type 0 +#define p521_falcon1024_input_type "p521_falcon1024" +#define p521_falcon1024_pem_type "p521_falcon1024" +#define falconpadded1024_evp_type 0 +#define falconpadded1024_input_type "falconpadded1024" +#define falconpadded1024_pem_type "falconpadded1024" +#define p521_falconpadded1024_evp_type 0 +#define p521_falconpadded1024_input_type "p521_falconpadded1024" +#define p521_falconpadded1024_pem_type "p521_falconpadded1024" ///// OQS_TEMPLATE_FRAGMENT_ENCODER_DEFINES_END /* ---------------------------------------------------------------------- */ @@ -2308,55 +2253,6 @@ MAKE_ENCODER(_ecp, p521_hqc256, oqsx, SubjectPublicKeyInfo, pem); MAKE_TEXT_ENCODER(_ecp, p521_hqc256); #endif /* OQS_KEM_ENCODERS */ -MAKE_ENCODER(, dilithium2, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium2, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium2, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium2, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium2); -MAKE_ENCODER(, p256_dilithium2, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, p256_dilithium2, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, p256_dilithium2, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, p256_dilithium2, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, p256_dilithium2, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, p256_dilithium2, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, p256_dilithium2); -MAKE_ENCODER(, rsa3072_dilithium2, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, rsa3072_dilithium2, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, rsa3072_dilithium2, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, rsa3072_dilithium2, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, rsa3072_dilithium2, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, rsa3072_dilithium2, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, rsa3072_dilithium2); -MAKE_ENCODER(, dilithium3, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium3, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium3, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium3, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium3); -MAKE_ENCODER(, p384_dilithium3, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, p384_dilithium3, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, p384_dilithium3, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, p384_dilithium3, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, p384_dilithium3, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, p384_dilithium3, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, p384_dilithium3); -MAKE_ENCODER(, dilithium5, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, dilithium5, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium5, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, dilithium5, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, dilithium5, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, dilithium5, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, dilithium5); -MAKE_ENCODER(, p521_dilithium5, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, p521_dilithium5, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, p521_dilithium5, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, p521_dilithium5, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, p521_dilithium5, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, p521_dilithium5, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, p521_dilithium5); MAKE_ENCODER(, mldsa44, oqsx, EncryptedPrivateKeyInfo, der); MAKE_ENCODER(, mldsa44, oqsx, EncryptedPrivateKeyInfo, pem); MAKE_ENCODER(, mldsa44, oqsx, PrivateKeyInfo, der); @@ -2567,87 +2463,4 @@ MAKE_ENCODER(, p521_falconpadded1024, oqsx, PrivateKeyInfo, pem); MAKE_ENCODER(, p521_falconpadded1024, oqsx, SubjectPublicKeyInfo, der); MAKE_ENCODER(, p521_falconpadded1024, oqsx, SubjectPublicKeyInfo, pem); MAKE_TEXT_ENCODER(, p521_falconpadded1024); -MAKE_ENCODER(, sphincssha2128fsimple, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, sphincssha2128fsimple, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, sphincssha2128fsimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, sphincssha2128fsimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, sphincssha2128fsimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, sphincssha2128fsimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, sphincssha2128fsimple); -MAKE_ENCODER(, p256_sphincssha2128fsimple, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, p256_sphincssha2128fsimple, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, p256_sphincssha2128fsimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, p256_sphincssha2128fsimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, p256_sphincssha2128fsimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, p256_sphincssha2128fsimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, p256_sphincssha2128fsimple); -MAKE_ENCODER(, rsa3072_sphincssha2128fsimple, oqsx, EncryptedPrivateKeyInfo, - der); -MAKE_ENCODER(, rsa3072_sphincssha2128fsimple, oqsx, EncryptedPrivateKeyInfo, - pem); -MAKE_ENCODER(, rsa3072_sphincssha2128fsimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, rsa3072_sphincssha2128fsimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, rsa3072_sphincssha2128fsimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, rsa3072_sphincssha2128fsimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, rsa3072_sphincssha2128fsimple); -MAKE_ENCODER(, sphincssha2128ssimple, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, sphincssha2128ssimple, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, sphincssha2128ssimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, sphincssha2128ssimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, sphincssha2128ssimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, sphincssha2128ssimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, sphincssha2128ssimple); -MAKE_ENCODER(, p256_sphincssha2128ssimple, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, p256_sphincssha2128ssimple, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, p256_sphincssha2128ssimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, p256_sphincssha2128ssimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, p256_sphincssha2128ssimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, p256_sphincssha2128ssimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, p256_sphincssha2128ssimple); -MAKE_ENCODER(, rsa3072_sphincssha2128ssimple, oqsx, EncryptedPrivateKeyInfo, - der); -MAKE_ENCODER(, rsa3072_sphincssha2128ssimple, oqsx, EncryptedPrivateKeyInfo, - pem); -MAKE_ENCODER(, rsa3072_sphincssha2128ssimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, rsa3072_sphincssha2128ssimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, rsa3072_sphincssha2128ssimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, rsa3072_sphincssha2128ssimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, rsa3072_sphincssha2128ssimple); -MAKE_ENCODER(, sphincssha2192fsimple, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, sphincssha2192fsimple, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, sphincssha2192fsimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, sphincssha2192fsimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, sphincssha2192fsimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, sphincssha2192fsimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, sphincssha2192fsimple); -MAKE_ENCODER(, p384_sphincssha2192fsimple, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, p384_sphincssha2192fsimple, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, p384_sphincssha2192fsimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, p384_sphincssha2192fsimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, p384_sphincssha2192fsimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, p384_sphincssha2192fsimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, p384_sphincssha2192fsimple); -MAKE_ENCODER(, sphincsshake128fsimple, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, sphincsshake128fsimple, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, sphincsshake128fsimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, sphincsshake128fsimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, sphincsshake128fsimple); -MAKE_ENCODER(, p256_sphincsshake128fsimple, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(, p256_sphincsshake128fsimple, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(, p256_sphincsshake128fsimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, p256_sphincsshake128fsimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, p256_sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, p256_sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, p256_sphincsshake128fsimple); -MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, EncryptedPrivateKeyInfo, - der); -MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, EncryptedPrivateKeyInfo, - pem); -MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo, pem); -MAKE_TEXT_ENCODER(, rsa3072_sphincsshake128fsimple); ///// OQS_TEMPLATE_FRAGMENT_ENCODER_MAKE_END diff --git a/oqsprov/oqs_kmgmt.c b/oqsprov/oqs_kmgmt.c index 50ad3012..b11cef6f 100644 --- a/oqsprov/oqs_kmgmt.c +++ b/oqsprov/oqs_kmgmt.c @@ -691,567 +691,342 @@ static int oqsx_gen_set_params(void *genctx, const OSSL_PARAM params[]) } ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_CONSTRUCTORS_START -static void *dilithium2_new_key(void *provctx) -{ - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_2, - "dilithium2", KEY_TYPE_SIG, NULL, 128, 0); -} - -static void *dilithium2_gen_init(void *provctx, int selection) -{ - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_2, - "dilithium2", 0, 128, 0); -} -static void *p256_dilithium2_new_key(void *provctx) -{ - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_2, - "p256_dilithium2", KEY_TYPE_HYB_SIG, NULL, 128, 1); -} - -static void *p256_dilithium2_gen_init(void *provctx, int selection) -{ - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_2, - "p256_dilithium2", KEY_TYPE_HYB_SIG, 128, 1); -} -static void *rsa3072_dilithium2_new_key(void *provctx) -{ - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_2, - "rsa3072_dilithium2", KEY_TYPE_HYB_SIG, NULL, 128, 2); -} - -static void *rsa3072_dilithium2_gen_init(void *provctx, int selection) -{ - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_2, - "rsa3072_dilithium2", KEY_TYPE_HYB_SIG, 128, 2); -} -static void *dilithium3_new_key(void *provctx) -{ - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, - "dilithium3", KEY_TYPE_SIG, NULL, 192, 3); -} - -static void *dilithium3_gen_init(void *provctx, int selection) -{ - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, - "dilithium3", 0, 192, 3); -} -static void *p384_dilithium3_new_key(void *provctx) -{ - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_3, - "p384_dilithium3", KEY_TYPE_HYB_SIG, NULL, 192, 4); -} - -static void *p384_dilithium3_gen_init(void *provctx, int selection) -{ - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_3, - "p384_dilithium3", KEY_TYPE_HYB_SIG, 192, 4); -} -static void *dilithium5_new_key(void *provctx) -{ - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_5, - "dilithium5", KEY_TYPE_SIG, NULL, 256, 5); -} - -static void *dilithium5_gen_init(void *provctx, int selection) -{ - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_5, - "dilithium5", 0, 256, 5); -} -static void *p521_dilithium5_new_key(void *provctx) -{ - return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_dilithium_5, - "p521_dilithium5", KEY_TYPE_HYB_SIG, NULL, 256, 6); -} - -static void *p521_dilithium5_gen_init(void *provctx, int selection) -{ - return oqsx_gen_init(provctx, selection, OQS_SIG_alg_dilithium_5, - "p521_dilithium5", KEY_TYPE_HYB_SIG, 256, 6); -} 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, 7); + "mldsa44", KEY_TYPE_SIG, NULL, 128, 0); } static void *mldsa44_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, "mldsa44", - 0, 128, 7); + 0, 128, 0); } 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, 8); + "p256_mldsa44", KEY_TYPE_HYB_SIG, NULL, 128, 1); } 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, 8); + "p256_mldsa44", KEY_TYPE_HYB_SIG, 128, 1); } 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, 9); + "rsa3072_mldsa44", KEY_TYPE_HYB_SIG, NULL, 128, 2); } 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, 9); + "rsa3072_mldsa44", KEY_TYPE_HYB_SIG, 128, 2); } static void *mldsa44_pss2048_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, - "mldsa44_pss2048", KEY_TYPE_CMP_SIG, NULL, 112, 10); + "mldsa44_pss2048", KEY_TYPE_CMP_SIG, NULL, 112, 3); } static void *mldsa44_pss2048_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, - "mldsa44_pss2048", KEY_TYPE_CMP_SIG, 112, 10); + "mldsa44_pss2048", KEY_TYPE_CMP_SIG, 112, 3); } static void *mldsa44_rsa2048_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, - "mldsa44_rsa2048", KEY_TYPE_CMP_SIG, NULL, 112, 11); + "mldsa44_rsa2048", KEY_TYPE_CMP_SIG, NULL, 112, 4); } static void *mldsa44_rsa2048_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, - "mldsa44_rsa2048", KEY_TYPE_CMP_SIG, 112, 11); + "mldsa44_rsa2048", KEY_TYPE_CMP_SIG, 112, 4); } static void *mldsa44_ed25519_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, - "mldsa44_ed25519", KEY_TYPE_CMP_SIG, NULL, 128, 12); + "mldsa44_ed25519", KEY_TYPE_CMP_SIG, NULL, 128, 5); } static void *mldsa44_ed25519_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, - "mldsa44_ed25519", KEY_TYPE_CMP_SIG, 128, 12); + "mldsa44_ed25519", KEY_TYPE_CMP_SIG, 128, 5); } static void *mldsa44_p256_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, - "mldsa44_p256", KEY_TYPE_CMP_SIG, NULL, 128, 13); + "mldsa44_p256", KEY_TYPE_CMP_SIG, NULL, 128, 6); } static void *mldsa44_p256_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, - "mldsa44_p256", KEY_TYPE_CMP_SIG, 128, 13); + "mldsa44_p256", KEY_TYPE_CMP_SIG, 128, 6); } static void *mldsa44_bp256_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_44, - "mldsa44_bp256", KEY_TYPE_CMP_SIG, NULL, 256, 14); + "mldsa44_bp256", KEY_TYPE_CMP_SIG, NULL, 256, 7); } static void *mldsa44_bp256_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_44, - "mldsa44_bp256", KEY_TYPE_CMP_SIG, 256, 14); + "mldsa44_bp256", KEY_TYPE_CMP_SIG, 256, 7); } 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, 15); + "mldsa65", KEY_TYPE_SIG, NULL, 192, 8); } static void *mldsa65_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, "mldsa65", - 0, 192, 15); + 0, 192, 8); } 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, 16); + "p384_mldsa65", KEY_TYPE_HYB_SIG, NULL, 192, 9); } 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, 16); + "p384_mldsa65", KEY_TYPE_HYB_SIG, 192, 9); } static void *mldsa65_pss3072_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, - "mldsa65_pss3072", KEY_TYPE_CMP_SIG, NULL, 128, 17); + "mldsa65_pss3072", KEY_TYPE_CMP_SIG, NULL, 128, 10); } static void *mldsa65_pss3072_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, - "mldsa65_pss3072", KEY_TYPE_CMP_SIG, 128, 17); + "mldsa65_pss3072", KEY_TYPE_CMP_SIG, 128, 10); } static void *mldsa65_rsa3072_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, - "mldsa65_rsa3072", KEY_TYPE_CMP_SIG, NULL, 128, 18); + "mldsa65_rsa3072", KEY_TYPE_CMP_SIG, NULL, 128, 11); } static void *mldsa65_rsa3072_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, - "mldsa65_rsa3072", KEY_TYPE_CMP_SIG, 128, 18); + "mldsa65_rsa3072", KEY_TYPE_CMP_SIG, 128, 11); } static void *mldsa65_p256_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, - "mldsa65_p256", KEY_TYPE_CMP_SIG, NULL, 128, 19); + "mldsa65_p256", KEY_TYPE_CMP_SIG, NULL, 128, 12); } static void *mldsa65_p256_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, - "mldsa65_p256", KEY_TYPE_CMP_SIG, 128, 19); + "mldsa65_p256", KEY_TYPE_CMP_SIG, 128, 12); } static void *mldsa65_bp256_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, - "mldsa65_bp256", KEY_TYPE_CMP_SIG, NULL, 256, 20); + "mldsa65_bp256", KEY_TYPE_CMP_SIG, NULL, 256, 13); } static void *mldsa65_bp256_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, - "mldsa65_bp256", KEY_TYPE_CMP_SIG, 256, 20); + "mldsa65_bp256", KEY_TYPE_CMP_SIG, 256, 13); } static void *mldsa65_ed25519_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_65, - "mldsa65_ed25519", KEY_TYPE_CMP_SIG, NULL, 128, 21); + "mldsa65_ed25519", KEY_TYPE_CMP_SIG, NULL, 128, 14); } static void *mldsa65_ed25519_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_65, - "mldsa65_ed25519", KEY_TYPE_CMP_SIG, 128, 21); + "mldsa65_ed25519", KEY_TYPE_CMP_SIG, 128, 14); } 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, 22); + "mldsa87", KEY_TYPE_SIG, NULL, 256, 15); } static void *mldsa87_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, "mldsa87", - 0, 256, 22); + 0, 256, 15); } 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, 23); + "p521_mldsa87", KEY_TYPE_HYB_SIG, NULL, 256, 16); } 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, 23); + "p521_mldsa87", KEY_TYPE_HYB_SIG, 256, 16); } static void *mldsa87_p384_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87, - "mldsa87_p384", KEY_TYPE_CMP_SIG, NULL, 192, 24); + "mldsa87_p384", KEY_TYPE_CMP_SIG, NULL, 192, 17); } static void *mldsa87_p384_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, - "mldsa87_p384", KEY_TYPE_CMP_SIG, 192, 24); + "mldsa87_p384", KEY_TYPE_CMP_SIG, 192, 17); } static void *mldsa87_bp384_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87, - "mldsa87_bp384", KEY_TYPE_CMP_SIG, NULL, 384, 25); + "mldsa87_bp384", KEY_TYPE_CMP_SIG, NULL, 384, 18); } static void *mldsa87_bp384_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, - "mldsa87_bp384", KEY_TYPE_CMP_SIG, 384, 25); + "mldsa87_bp384", KEY_TYPE_CMP_SIG, 384, 18); } static void *mldsa87_ed448_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_ml_dsa_87, - "mldsa87_ed448", KEY_TYPE_CMP_SIG, NULL, 192, 26); + "mldsa87_ed448", KEY_TYPE_CMP_SIG, NULL, 192, 19); } static void *mldsa87_ed448_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_ml_dsa_87, - "mldsa87_ed448", KEY_TYPE_CMP_SIG, 192, 26); + "mldsa87_ed448", KEY_TYPE_CMP_SIG, 192, 19); } static void *falcon512_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_512, - "falcon512", KEY_TYPE_SIG, NULL, 128, 27); + "falcon512", KEY_TYPE_SIG, NULL, 128, 20); } static void *falcon512_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "falcon512", 0, 128, 27); + "falcon512", 0, 128, 20); } static void *p256_falcon512_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, 28); + "p256_falcon512", KEY_TYPE_HYB_SIG, NULL, 128, 21); } static void *p256_falcon512_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "p256_falcon512", KEY_TYPE_HYB_SIG, 128, 28); + "p256_falcon512", KEY_TYPE_HYB_SIG, 128, 21); } static void *rsa3072_falcon512_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, 29); + "rsa3072_falcon512", KEY_TYPE_HYB_SIG, NULL, 128, 22); } static void *rsa3072_falcon512_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_512, - "rsa3072_falcon512", KEY_TYPE_HYB_SIG, 128, 29); + "rsa3072_falcon512", KEY_TYPE_HYB_SIG, 128, 22); } static void *falconpadded512_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_padded_512, "falconpadded512", - KEY_TYPE_SIG, NULL, 128, 30); + KEY_TYPE_SIG, NULL, 128, 23); } static void *falconpadded512_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_padded_512, - "falconpadded512", 0, 128, 30); + "falconpadded512", 0, 128, 23); } static void *p256_falconpadded512_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_padded_512, "p256_falconpadded512", - KEY_TYPE_HYB_SIG, NULL, 128, 31); + KEY_TYPE_HYB_SIG, NULL, 128, 24); } static void *p256_falconpadded512_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_padded_512, - "p256_falconpadded512", KEY_TYPE_HYB_SIG, 128, 31); + "p256_falconpadded512", KEY_TYPE_HYB_SIG, 128, 24); } static void *rsa3072_falconpadded512_new_key(void *provctx) { return oqsx_key_new( PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_padded_512, - "rsa3072_falconpadded512", KEY_TYPE_HYB_SIG, NULL, 128, 32); + "rsa3072_falconpadded512", KEY_TYPE_HYB_SIG, NULL, 128, 25); } static void *rsa3072_falconpadded512_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_padded_512, - "rsa3072_falconpadded512", KEY_TYPE_HYB_SIG, 128, 32); + "rsa3072_falconpadded512", KEY_TYPE_HYB_SIG, 128, 25); } 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, 33); + "falcon1024", KEY_TYPE_SIG, NULL, 256, 26); } static void *falcon1024_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_1024, - "falcon1024", 0, 256, 33); + "falcon1024", 0, 256, 26); } 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, 34); + "p521_falcon1024", KEY_TYPE_HYB_SIG, NULL, 256, 27); } 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, 34); + "p521_falcon1024", KEY_TYPE_HYB_SIG, 256, 27); } static void *falconpadded1024_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_padded_1024, "falconpadded1024", - KEY_TYPE_SIG, NULL, 256, 35); + KEY_TYPE_SIG, NULL, 256, 28); } static void *falconpadded1024_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_padded_1024, - "falconpadded1024", 0, 256, 35); + "falconpadded1024", 0, 256, 28); } static void *p521_falconpadded1024_new_key(void *provctx) { return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_falcon_padded_1024, "p521_falconpadded1024", - KEY_TYPE_HYB_SIG, NULL, 256, 36); + KEY_TYPE_HYB_SIG, NULL, 256, 29); } static void *p521_falconpadded1024_gen_init(void *provctx, int selection) { return oqsx_gen_init(provctx, selection, OQS_SIG_alg_falcon_padded_1024, - "p521_falconpadded1024", KEY_TYPE_HYB_SIG, 256, 36); -} - -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, 37); -} - -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, 37); -} -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, 38); -} - -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, 38); -} -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, 39); -} - -static void *rsa3072_sphincssha2128fsimple_gen_init(void *provctx, - int selection) -{ - return oqsx_gen_init( - provctx, selection, OQS_SIG_alg_sphincs_sha2_128f_simple, - "rsa3072_sphincssha2128fsimple", KEY_TYPE_HYB_SIG, 128, 39); -} -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, 40); -} - -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, 40); -} -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, 41); -} - -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, 41); -} -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, 42); -} - -static void *rsa3072_sphincssha2128ssimple_gen_init(void *provctx, - int selection) -{ - return oqsx_gen_init( - provctx, selection, OQS_SIG_alg_sphincs_sha2_128s_simple, - "rsa3072_sphincssha2128ssimple", KEY_TYPE_HYB_SIG, 128, 42); -} -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, 43); -} - -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, 43); -} -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, 44); -} - -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, 44); -} - -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, 45); -} - -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, 45); -} -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, 46); -} - -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, 46); -} -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, 47); -} - -static void *rsa3072_sphincsshake128fsimple_gen_init(void *provctx, - int selection) -{ - return oqsx_gen_init( - provctx, selection, OQS_SIG_alg_sphincs_shake_128f_simple, - "rsa3072_sphincsshake128fsimple", KEY_TYPE_HYB_SIG, 128, 47); + "p521_falconpadded1024", KEY_TYPE_HYB_SIG, 256, 29); } ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_CONSTRUCTORS_END @@ -1403,13 +1178,6 @@ static void *rsa3072_sphincsshake128fsimple_gen_init(void *provctx, {0, NULL}}; ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_FUNCTIONS_START -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium2) -MAKE_SIG_KEYMGMT_FUNCTIONS(p256_dilithium2) -MAKE_SIG_KEYMGMT_FUNCTIONS(rsa3072_dilithium2) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium3) -MAKE_SIG_KEYMGMT_FUNCTIONS(p384_dilithium3) -MAKE_SIG_KEYMGMT_FUNCTIONS(dilithium5) -MAKE_SIG_KEYMGMT_FUNCTIONS(p521_dilithium5) MAKE_SIG_KEYMGMT_FUNCTIONS(mldsa44) MAKE_SIG_KEYMGMT_FUNCTIONS(p256_mldsa44) MAKE_SIG_KEYMGMT_FUNCTIONS(rsa3072_mldsa44) @@ -1440,17 +1208,6 @@ MAKE_SIG_KEYMGMT_FUNCTIONS(falcon1024) MAKE_SIG_KEYMGMT_FUNCTIONS(p521_falcon1024) MAKE_SIG_KEYMGMT_FUNCTIONS(falconpadded1024) MAKE_SIG_KEYMGMT_FUNCTIONS(p521_falconpadded1024) -MAKE_SIG_KEYMGMT_FUNCTIONS(sphincssha2128fsimple) -MAKE_SIG_KEYMGMT_FUNCTIONS(p256_sphincssha2128fsimple) -MAKE_SIG_KEYMGMT_FUNCTIONS(rsa3072_sphincssha2128fsimple) -MAKE_SIG_KEYMGMT_FUNCTIONS(sphincssha2128ssimple) -MAKE_SIG_KEYMGMT_FUNCTIONS(p256_sphincssha2128ssimple) -MAKE_SIG_KEYMGMT_FUNCTIONS(rsa3072_sphincssha2128ssimple) -MAKE_SIG_KEYMGMT_FUNCTIONS(sphincssha2192fsimple) -MAKE_SIG_KEYMGMT_FUNCTIONS(p384_sphincssha2192fsimple) -MAKE_SIG_KEYMGMT_FUNCTIONS(sphincsshake128fsimple) -MAKE_SIG_KEYMGMT_FUNCTIONS(p256_sphincsshake128fsimple) -MAKE_SIG_KEYMGMT_FUNCTIONS(rsa3072_sphincsshake128fsimple) MAKE_KEM_KEYMGMT_FUNCTIONS(frodo640aes, OQS_KEM_alg_frodokem_640_aes, 128) diff --git a/oqsprov/oqs_prov.h b/oqsprov/oqs_prov.h index 2a08b0b8..69e61dd9 100644 --- a/oqsprov/oqs_prov.h +++ b/oqsprov/oqs_prov.h @@ -1160,125 +1160,6 @@ extern const OSSL_DISPATCH #endif /* OQS_KEM_ENCODERS */ -extern const OSSL_DISPATCH - oqs_dilithium2_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium2_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium2_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium2_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium2_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_dilithium2_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_dilithium2_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_dilithium2_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_dilithium2_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_dilithium2_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_dilithium2_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_p256_dilithium2_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_p256_dilithium2_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_p256_dilithium2_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_dilithium2_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_dilithium2_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_dilithium2_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_dilithium2_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_dilithium2_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_dilithium2_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_rsa3072_dilithium2_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_rsa3072_dilithium2_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_rsa3072_dilithium2_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium3_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium3_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium3_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_p384_dilithium3_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p384_dilithium3_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p384_dilithium3_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p384_dilithium3_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p384_dilithium3_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p384_dilithium3_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_p384_dilithium3_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_p384_dilithium3_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_p384_dilithium3_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium5_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium5_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium5_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium5_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium5_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_dilithium5_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_dilithium5_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_dilithium5_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_dilithium5_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_p521_dilithium5_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p521_dilithium5_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p521_dilithium5_to_EncryptedPrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p521_dilithium5_to_EncryptedPrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p521_dilithium5_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p521_dilithium5_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH oqs_p521_dilithium5_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_p521_dilithium5_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_p521_dilithium5_decoder_functions[]; extern const OSSL_DISPATCH oqs_mldsa44_to_PrivateKeyInfo_der_encoder_functions[]; extern const OSSL_DISPATCH @@ -1795,260 +1676,9 @@ extern const OSSL_DISPATCH oqs_PrivateKeyInfo_der_to_p521_falconpadded1024_decoder_functions[]; extern const OSSL_DISPATCH oqs_SubjectPublicKeyInfo_der_to_p521_falconpadded1024_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2128fsimple_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2128fsimple_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2128fsimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincssha2128fsimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincssha2128fsimple_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2128fsimple_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2128fsimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_sphincssha2128fsimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_sphincssha2128fsimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128fsimple_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128fsimple_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128fsimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128fsimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128fsimple_to_SubjectPublicKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128fsimple_to_SubjectPublicKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128fsimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_p256_sphincssha2128fsimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_p256_sphincssha2128fsimple_decoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128fsimple_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128fsimple_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128fsimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128fsimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128fsimple_to_SubjectPublicKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128fsimple_to_SubjectPublicKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128fsimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_rsa3072_sphincssha2128fsimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_rsa3072_sphincssha2128fsimple_decoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincssha2128ssimple_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2128ssimple_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2128ssimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincssha2128ssimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincssha2128ssimple_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2128ssimple_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2128ssimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_sphincssha2128ssimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_sphincssha2128ssimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128ssimple_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128ssimple_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128ssimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128ssimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128ssimple_to_SubjectPublicKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128ssimple_to_SubjectPublicKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincssha2128ssimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_p256_sphincssha2128ssimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_p256_sphincssha2128ssimple_decoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128ssimple_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128ssimple_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128ssimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128ssimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128ssimple_to_SubjectPublicKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128ssimple_to_SubjectPublicKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128ssimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_rsa3072_sphincssha2128ssimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_rsa3072_sphincssha2128ssimple_decoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincssha2192fsimple_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2192fsimple_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2192fsimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincssha2192fsimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincssha2192fsimple_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2192fsimple_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincssha2192fsimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_sphincssha2192fsimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_sphincssha2192fsimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_p384_sphincssha2192fsimple_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p384_sphincssha2192fsimple_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p384_sphincssha2192fsimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p384_sphincssha2192fsimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p384_sphincssha2192fsimple_to_SubjectPublicKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p384_sphincssha2192fsimple_to_SubjectPublicKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p384_sphincssha2192fsimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_p384_sphincssha2192fsimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_p384_sphincssha2192fsimple_decoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincsshake128fsimple_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincsshake128fsimple_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincsshake128fsimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincsshake128fsimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_sphincsshake128fsimple_to_SubjectPublicKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincsshake128fsimple_to_SubjectPublicKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_sphincsshake128fsimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_sphincsshake128fsimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_sphincsshake128fsimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_sphincsshake128fsimple_to_PrivateKeyInfo_der_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_sphincsshake128fsimple_to_PrivateKeyInfo_pem_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_p256_sphincsshake128fsimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincsshake128fsimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincsshake128fsimple_to_SubjectPublicKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincsshake128fsimple_to_SubjectPublicKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_p256_sphincsshake128fsimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_p256_sphincsshake128fsimple_decoder_functions[]; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_p256_sphincsshake128fsimple_decoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincsshake128fsimple_to_PrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincsshake128fsimple_to_PrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincsshake128fsimple_to_EncryptedPrivateKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincsshake128fsimple_to_EncryptedPrivateKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincsshake128fsimple_to_SubjectPublicKeyInfo_der_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincsshake128fsimple_to_SubjectPublicKeyInfo_pem_encoder_functions - []; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincsshake128fsimple_to_text_encoder_functions[]; -extern const OSSL_DISPATCH - oqs_PrivateKeyInfo_der_to_rsa3072_sphincsshake128fsimple_decoder_functions - []; -extern const OSSL_DISPATCH - oqs_SubjectPublicKeyInfo_der_to_rsa3072_sphincsshake128fsimple_decoder_functions - []; ///// OQS_TEMPLATE_FRAGMENT_ENDECODER_FUNCTIONS_END ///// OQS_TEMPLATE_FRAGMENT_ALG_FUNCTIONS_START -extern const OSSL_DISPATCH oqs_dilithium2_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_p256_dilithium2_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_rsa3072_dilithium2_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium3_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_p384_dilithium3_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_dilithium5_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_p521_dilithium5_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[]; @@ -2079,20 +1709,6 @@ extern const OSSL_DISPATCH oqs_falcon1024_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_p521_falcon1024_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_falconpadded1024_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_p521_falconpadded1024_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_sphincssha2128fsimple_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_p256_sphincssha2128fsimple_keymgmt_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128fsimple_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_sphincssha2128ssimple_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_p256_sphincssha2128ssimple_keymgmt_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincssha2128ssimple_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_sphincssha2192fsimple_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_p384_sphincssha2192fsimple_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_sphincsshake128fsimple_keymgmt_functions[]; -extern const OSSL_DISPATCH oqs_p256_sphincsshake128fsimple_keymgmt_functions[]; -extern const OSSL_DISPATCH - oqs_rsa3072_sphincsshake128fsimple_keymgmt_functions[]; extern const OSSL_DISPATCH oqs_frodo640aes_keymgmt_functions[]; diff --git a/oqsprov/oqsdecoders.inc b/oqsprov/oqsdecoders.inc index f9d9fc4d..a1a3ff99 100644 --- a/oqsprov/oqsdecoders.inc +++ b/oqsprov/oqsdecoders.inc @@ -226,34 +226,6 @@ DECODER_w_structure("frodo640aes", der, PrivateKeyInfo, frodo640aes), #endif /* OQS_KEM_ENCODERS */ -#ifdef OQS_ENABLE_SIG_dilithium_2 - DECODER_w_structure("dilithium2", der, PrivateKeyInfo, dilithium2), - DECODER_w_structure("dilithium2", der, SubjectPublicKeyInfo, dilithium2), - DECODER_w_structure("p256_dilithium2", der, PrivateKeyInfo, - p256_dilithium2), - DECODER_w_structure("p256_dilithium2", der, SubjectPublicKeyInfo, - p256_dilithium2), - DECODER_w_structure("rsa3072_dilithium2", der, PrivateKeyInfo, - rsa3072_dilithium2), - DECODER_w_structure("rsa3072_dilithium2", der, SubjectPublicKeyInfo, - rsa3072_dilithium2), -#endif -#ifdef OQS_ENABLE_SIG_dilithium_3 - DECODER_w_structure("dilithium3", der, PrivateKeyInfo, dilithium3), - DECODER_w_structure("dilithium3", der, SubjectPublicKeyInfo, dilithium3), - DECODER_w_structure("p384_dilithium3", der, PrivateKeyInfo, - p384_dilithium3), - DECODER_w_structure("p384_dilithium3", der, SubjectPublicKeyInfo, - p384_dilithium3), -#endif -#ifdef OQS_ENABLE_SIG_dilithium_5 - DECODER_w_structure("dilithium5", der, PrivateKeyInfo, dilithium5), - DECODER_w_structure("dilithium5", der, SubjectPublicKeyInfo, dilithium5), - DECODER_w_structure("p521_dilithium5", der, PrivateKeyInfo, - p521_dilithium5), - DECODER_w_structure("p521_dilithium5", der, SubjectPublicKeyInfo, - p521_dilithium5), -#endif #ifdef OQS_ENABLE_SIG_ml_dsa_44 DECODER_w_structure("mldsa44", der, PrivateKeyInfo, mldsa44), DECODER_w_structure("mldsa44", der, SubjectPublicKeyInfo, mldsa44), @@ -366,57 +338,5 @@ DECODER_w_structure("frodo640aes", der, PrivateKeyInfo, frodo640aes), p521_falconpadded1024), DECODER_w_structure("p521_falconpadded1024", der, SubjectPublicKeyInfo, p521_falconpadded1024), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_128f_simple - DECODER_w_structure("sphincssha2128fsimple", der, PrivateKeyInfo, - sphincssha2128fsimple), - DECODER_w_structure("sphincssha2128fsimple", der, SubjectPublicKeyInfo, - sphincssha2128fsimple), - DECODER_w_structure("p256_sphincssha2128fsimple", der, PrivateKeyInfo, - p256_sphincssha2128fsimple), - DECODER_w_structure("p256_sphincssha2128fsimple", der, SubjectPublicKeyInfo, - p256_sphincssha2128fsimple), - DECODER_w_structure("rsa3072_sphincssha2128fsimple", der, PrivateKeyInfo, - rsa3072_sphincssha2128fsimple), - DECODER_w_structure("rsa3072_sphincssha2128fsimple", der, - SubjectPublicKeyInfo, rsa3072_sphincssha2128fsimple), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_128s_simple - DECODER_w_structure("sphincssha2128ssimple", der, PrivateKeyInfo, - sphincssha2128ssimple), - DECODER_w_structure("sphincssha2128ssimple", der, SubjectPublicKeyInfo, - sphincssha2128ssimple), - DECODER_w_structure("p256_sphincssha2128ssimple", der, PrivateKeyInfo, - p256_sphincssha2128ssimple), - DECODER_w_structure("p256_sphincssha2128ssimple", der, SubjectPublicKeyInfo, - p256_sphincssha2128ssimple), - DECODER_w_structure("rsa3072_sphincssha2128ssimple", der, PrivateKeyInfo, - rsa3072_sphincssha2128ssimple), - DECODER_w_structure("rsa3072_sphincssha2128ssimple", der, - SubjectPublicKeyInfo, rsa3072_sphincssha2128ssimple), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_192f_simple - DECODER_w_structure("sphincssha2192fsimple", der, PrivateKeyInfo, - sphincssha2192fsimple), - DECODER_w_structure("sphincssha2192fsimple", der, SubjectPublicKeyInfo, - sphincssha2192fsimple), - DECODER_w_structure("p384_sphincssha2192fsimple", der, PrivateKeyInfo, - p384_sphincssha2192fsimple), - DECODER_w_structure("p384_sphincssha2192fsimple", der, SubjectPublicKeyInfo, - p384_sphincssha2192fsimple), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_shake_128f_simple - DECODER_w_structure("sphincsshake128fsimple", der, PrivateKeyInfo, - sphincsshake128fsimple), - DECODER_w_structure("sphincsshake128fsimple", der, SubjectPublicKeyInfo, - sphincsshake128fsimple), - DECODER_w_structure("p256_sphincsshake128fsimple", der, PrivateKeyInfo, - p256_sphincsshake128fsimple), - DECODER_w_structure("p256_sphincsshake128fsimple", der, - SubjectPublicKeyInfo, p256_sphincsshake128fsimple), - DECODER_w_structure("rsa3072_sphincsshake128fsimple", der, PrivateKeyInfo, - rsa3072_sphincsshake128fsimple), - DECODER_w_structure("rsa3072_sphincsshake128fsimple", der, - SubjectPublicKeyInfo, rsa3072_sphincsshake128fsimple), #endif ///// OQS_TEMPLATE_FRAGMENT_MAKE_END diff --git a/oqsprov/oqsencoders.inc b/oqsprov/oqsencoders.inc index 34537f51..01aaed20 100644 --- a/oqsprov/oqsencoders.inc +++ b/oqsprov/oqsencoders.inc @@ -663,85 +663,6 @@ ENCODER_w_structure("frodo640aes", frodo640aes, der, PrivateKeyInfo), #endif /* OQS_KEM_ENCODERS */ -#ifdef OQS_ENABLE_SIG_dilithium_2 - ENCODER_w_structure("dilithium2", dilithium2, der, PrivateKeyInfo), - ENCODER_w_structure("dilithium2", dilithium2, pem, PrivateKeyInfo), - ENCODER_w_structure("dilithium2", dilithium2, der, EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2", dilithium2, pem, EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium2", dilithium2, der, SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium2", dilithium2, pem, SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium2", dilithium2), - ENCODER_w_structure("p256_dilithium2", p256_dilithium2, der, - PrivateKeyInfo), - ENCODER_w_structure("p256_dilithium2", p256_dilithium2, pem, - PrivateKeyInfo), - ENCODER_w_structure("p256_dilithium2", p256_dilithium2, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p256_dilithium2", p256_dilithium2, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p256_dilithium2", p256_dilithium2, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("p256_dilithium2", p256_dilithium2, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("p256_dilithium2", p256_dilithium2), - ENCODER_w_structure("rsa3072_dilithium2", rsa3072_dilithium2, der, - PrivateKeyInfo), - ENCODER_w_structure("rsa3072_dilithium2", rsa3072_dilithium2, pem, - PrivateKeyInfo), - ENCODER_w_structure("rsa3072_dilithium2", rsa3072_dilithium2, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("rsa3072_dilithium2", rsa3072_dilithium2, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("rsa3072_dilithium2", rsa3072_dilithium2, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("rsa3072_dilithium2", rsa3072_dilithium2, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("rsa3072_dilithium2", rsa3072_dilithium2), -#endif -#ifdef OQS_ENABLE_SIG_dilithium_3 - ENCODER_w_structure("dilithium3", dilithium3, der, PrivateKeyInfo), - ENCODER_w_structure("dilithium3", dilithium3, pem, PrivateKeyInfo), - ENCODER_w_structure("dilithium3", dilithium3, der, EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3", dilithium3, pem, EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium3", dilithium3, der, SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium3", dilithium3, pem, SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium3", dilithium3), - ENCODER_w_structure("p384_dilithium3", p384_dilithium3, der, - PrivateKeyInfo), - ENCODER_w_structure("p384_dilithium3", p384_dilithium3, pem, - PrivateKeyInfo), - ENCODER_w_structure("p384_dilithium3", p384_dilithium3, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p384_dilithium3", p384_dilithium3, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p384_dilithium3", p384_dilithium3, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("p384_dilithium3", p384_dilithium3, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("p384_dilithium3", p384_dilithium3), -#endif -#ifdef OQS_ENABLE_SIG_dilithium_5 - ENCODER_w_structure("dilithium5", dilithium5, der, PrivateKeyInfo), - ENCODER_w_structure("dilithium5", dilithium5, pem, PrivateKeyInfo), - ENCODER_w_structure("dilithium5", dilithium5, der, EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium5", dilithium5, pem, EncryptedPrivateKeyInfo), - ENCODER_w_structure("dilithium5", dilithium5, der, SubjectPublicKeyInfo), - ENCODER_w_structure("dilithium5", dilithium5, pem, SubjectPublicKeyInfo), - ENCODER_TEXT("dilithium5", dilithium5), - ENCODER_w_structure("p521_dilithium5", p521_dilithium5, der, - PrivateKeyInfo), - ENCODER_w_structure("p521_dilithium5", p521_dilithium5, pem, - PrivateKeyInfo), - ENCODER_w_structure("p521_dilithium5", p521_dilithium5, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p521_dilithium5", p521_dilithium5, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p521_dilithium5", p521_dilithium5, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("p521_dilithium5", p521_dilithium5, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("p521_dilithium5", p521_dilithium5), -#endif #ifdef OQS_ENABLE_SIG_ml_dsa_44 ENCODER_w_structure("mldsa44", mldsa44, der, PrivateKeyInfo), ENCODER_w_structure("mldsa44", mldsa44, pem, PrivateKeyInfo), @@ -1093,179 +1014,5 @@ ENCODER_w_structure("frodo640aes", frodo640aes, der, PrivateKeyInfo), ENCODER_w_structure("p521_falconpadded1024", p521_falconpadded1024, pem, SubjectPublicKeyInfo), ENCODER_TEXT("p521_falconpadded1024", p521_falconpadded1024), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_128f_simple - ENCODER_w_structure("sphincssha2128fsimple", sphincssha2128fsimple, der, - PrivateKeyInfo), - ENCODER_w_structure("sphincssha2128fsimple", sphincssha2128fsimple, pem, - PrivateKeyInfo), - ENCODER_w_structure("sphincssha2128fsimple", sphincssha2128fsimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("sphincssha2128fsimple", sphincssha2128fsimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("sphincssha2128fsimple", sphincssha2128fsimple, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("sphincssha2128fsimple", sphincssha2128fsimple, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("sphincssha2128fsimple", sphincssha2128fsimple), - ENCODER_w_structure("p256_sphincssha2128fsimple", - p256_sphincssha2128fsimple, der, PrivateKeyInfo), - ENCODER_w_structure("p256_sphincssha2128fsimple", - p256_sphincssha2128fsimple, pem, PrivateKeyInfo), - ENCODER_w_structure("p256_sphincssha2128fsimple", - p256_sphincssha2128fsimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p256_sphincssha2128fsimple", - p256_sphincssha2128fsimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p256_sphincssha2128fsimple", - p256_sphincssha2128fsimple, der, SubjectPublicKeyInfo), - ENCODER_w_structure("p256_sphincssha2128fsimple", - p256_sphincssha2128fsimple, pem, SubjectPublicKeyInfo), - ENCODER_TEXT("p256_sphincssha2128fsimple", p256_sphincssha2128fsimple), - ENCODER_w_structure("rsa3072_sphincssha2128fsimple", - rsa3072_sphincssha2128fsimple, der, PrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincssha2128fsimple", - rsa3072_sphincssha2128fsimple, pem, PrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincssha2128fsimple", - rsa3072_sphincssha2128fsimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincssha2128fsimple", - rsa3072_sphincssha2128fsimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincssha2128fsimple", - rsa3072_sphincssha2128fsimple, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("rsa3072_sphincssha2128fsimple", - rsa3072_sphincssha2128fsimple, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("rsa3072_sphincssha2128fsimple", - rsa3072_sphincssha2128fsimple), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_128s_simple - ENCODER_w_structure("sphincssha2128ssimple", sphincssha2128ssimple, der, - PrivateKeyInfo), - ENCODER_w_structure("sphincssha2128ssimple", sphincssha2128ssimple, pem, - PrivateKeyInfo), - ENCODER_w_structure("sphincssha2128ssimple", sphincssha2128ssimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("sphincssha2128ssimple", sphincssha2128ssimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("sphincssha2128ssimple", sphincssha2128ssimple, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("sphincssha2128ssimple", sphincssha2128ssimple, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("sphincssha2128ssimple", sphincssha2128ssimple), - ENCODER_w_structure("p256_sphincssha2128ssimple", - p256_sphincssha2128ssimple, der, PrivateKeyInfo), - ENCODER_w_structure("p256_sphincssha2128ssimple", - p256_sphincssha2128ssimple, pem, PrivateKeyInfo), - ENCODER_w_structure("p256_sphincssha2128ssimple", - p256_sphincssha2128ssimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p256_sphincssha2128ssimple", - p256_sphincssha2128ssimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p256_sphincssha2128ssimple", - p256_sphincssha2128ssimple, der, SubjectPublicKeyInfo), - ENCODER_w_structure("p256_sphincssha2128ssimple", - p256_sphincssha2128ssimple, pem, SubjectPublicKeyInfo), - ENCODER_TEXT("p256_sphincssha2128ssimple", p256_sphincssha2128ssimple), - ENCODER_w_structure("rsa3072_sphincssha2128ssimple", - rsa3072_sphincssha2128ssimple, der, PrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincssha2128ssimple", - rsa3072_sphincssha2128ssimple, pem, PrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincssha2128ssimple", - rsa3072_sphincssha2128ssimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincssha2128ssimple", - rsa3072_sphincssha2128ssimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincssha2128ssimple", - rsa3072_sphincssha2128ssimple, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("rsa3072_sphincssha2128ssimple", - rsa3072_sphincssha2128ssimple, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("rsa3072_sphincssha2128ssimple", - rsa3072_sphincssha2128ssimple), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_192f_simple - ENCODER_w_structure("sphincssha2192fsimple", sphincssha2192fsimple, der, - PrivateKeyInfo), - ENCODER_w_structure("sphincssha2192fsimple", sphincssha2192fsimple, pem, - PrivateKeyInfo), - ENCODER_w_structure("sphincssha2192fsimple", sphincssha2192fsimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("sphincssha2192fsimple", sphincssha2192fsimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("sphincssha2192fsimple", sphincssha2192fsimple, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("sphincssha2192fsimple", sphincssha2192fsimple, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("sphincssha2192fsimple", sphincssha2192fsimple), - ENCODER_w_structure("p384_sphincssha2192fsimple", - p384_sphincssha2192fsimple, der, PrivateKeyInfo), - ENCODER_w_structure("p384_sphincssha2192fsimple", - p384_sphincssha2192fsimple, pem, PrivateKeyInfo), - ENCODER_w_structure("p384_sphincssha2192fsimple", - p384_sphincssha2192fsimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p384_sphincssha2192fsimple", - p384_sphincssha2192fsimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p384_sphincssha2192fsimple", - p384_sphincssha2192fsimple, der, SubjectPublicKeyInfo), - ENCODER_w_structure("p384_sphincssha2192fsimple", - p384_sphincssha2192fsimple, pem, SubjectPublicKeyInfo), - ENCODER_TEXT("p384_sphincssha2192fsimple", p384_sphincssha2192fsimple), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_shake_128f_simple - ENCODER_w_structure("sphincsshake128fsimple", sphincsshake128fsimple, der, - PrivateKeyInfo), - ENCODER_w_structure("sphincsshake128fsimple", sphincsshake128fsimple, pem, - PrivateKeyInfo), - ENCODER_w_structure("sphincsshake128fsimple", sphincsshake128fsimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("sphincsshake128fsimple", sphincsshake128fsimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("sphincsshake128fsimple", sphincsshake128fsimple, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("sphincsshake128fsimple", sphincsshake128fsimple, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("sphincsshake128fsimple", sphincsshake128fsimple), - ENCODER_w_structure("p256_sphincsshake128fsimple", - p256_sphincsshake128fsimple, der, PrivateKeyInfo), - ENCODER_w_structure("p256_sphincsshake128fsimple", - p256_sphincsshake128fsimple, pem, PrivateKeyInfo), - ENCODER_w_structure("p256_sphincsshake128fsimple", - p256_sphincsshake128fsimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p256_sphincsshake128fsimple", - p256_sphincsshake128fsimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("p256_sphincsshake128fsimple", - p256_sphincsshake128fsimple, der, SubjectPublicKeyInfo), - ENCODER_w_structure("p256_sphincsshake128fsimple", - p256_sphincsshake128fsimple, pem, SubjectPublicKeyInfo), - ENCODER_TEXT("p256_sphincsshake128fsimple", p256_sphincsshake128fsimple), - ENCODER_w_structure("rsa3072_sphincsshake128fsimple", - rsa3072_sphincsshake128fsimple, der, PrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincsshake128fsimple", - rsa3072_sphincsshake128fsimple, pem, PrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincsshake128fsimple", - rsa3072_sphincsshake128fsimple, der, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincsshake128fsimple", - rsa3072_sphincsshake128fsimple, pem, - EncryptedPrivateKeyInfo), - ENCODER_w_structure("rsa3072_sphincsshake128fsimple", - rsa3072_sphincsshake128fsimple, der, - SubjectPublicKeyInfo), - ENCODER_w_structure("rsa3072_sphincsshake128fsimple", - rsa3072_sphincsshake128fsimple, pem, - SubjectPublicKeyInfo), - ENCODER_TEXT("rsa3072_sphincsshake128fsimple", - rsa3072_sphincsshake128fsimple), #endif ///// OQS_TEMPLATE_FRAGMENT_MAKE_END diff --git a/oqsprov/oqsprov.c b/oqsprov/oqsprov.c index ea5d25aa..56918fce 100644 --- a/oqsprov/oqsprov.c +++ b/oqsprov/oqsprov.c @@ -50,9 +50,9 @@ 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 202 +# define OQS_OID_CNT 166 #else -# define OQS_OID_CNT 96 +# define OQS_OID_CNT 60 #endif const char *oqs_oid_alg_list[OQS_OID_CNT] = { @@ -167,20 +167,6 @@ const char *oqs_oid_alg_list[OQS_OID_CNT] = { #endif /* OQS_KEM_ENCODERS */ - "1.3.6.1.4.1.2.267.7.4.4", - "dilithium2", - "1.3.9999.2.7.1", - "p256_dilithium2", - "1.3.9999.2.7.2", - "rsa3072_dilithium2", - "1.3.6.1.4.1.2.267.7.6.5", - "dilithium3", - "1.3.9999.2.7.3", - "p384_dilithium3", - "1.3.6.1.4.1.2.267.7.8.7", - "dilithium5", - "1.3.9999.2.7.4", - "p521_dilithium5", "1.3.6.1.4.1.2.267.12.4.4", "mldsa44", "1.3.9999.7.1", @@ -241,28 +227,6 @@ const char *oqs_oid_alg_list[OQS_OID_CNT] = { "falconpadded1024", "1.3.9999.3.20", "p521_falconpadded1024", - "1.3.9999.6.4.13", - "sphincssha2128fsimple", - "1.3.9999.6.4.14", - "p256_sphincssha2128fsimple", - "1.3.9999.6.4.15", - "rsa3072_sphincssha2128fsimple", - "1.3.9999.6.4.16", - "sphincssha2128ssimple", - "1.3.9999.6.4.17", - "p256_sphincssha2128ssimple", - "1.3.9999.6.4.18", - "rsa3072_sphincssha2128ssimple", - "1.3.9999.6.5.10", - "sphincssha2192fsimple", - "1.3.9999.6.5.11", - "p384_sphincssha2192fsimple", - "1.3.9999.6.7.13", - "sphincsshake128fsimple", - "1.3.9999.6.7.14", - "p256_sphincsshake128fsimple", - "1.3.9999.6.7.15", - "rsa3072_sphincsshake128fsimple", ///// OQS_TEMPLATE_FRAGMENT_ASSIGN_SIG_OIDS_END }; @@ -403,76 +367,40 @@ int oqs_patch_oids(void) #else # define OQS_KEMOID_CNT 0 #endif /* OQS_KEM_ENCODERS */ - if ((envval = getenv("OQS_OID_DILITHIUM2"))) - oqs_oid_alg_list[0 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_P256_DILITHIUM2"))) - oqs_oid_alg_list[2 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_RSA3072_DILITHIUM2"))) - oqs_oid_alg_list[4 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_DILITHIUM3"))) - oqs_oid_alg_list[6 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_P384_DILITHIUM3"))) - oqs_oid_alg_list[8 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_DILITHIUM5"))) - oqs_oid_alg_list[10 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_P521_DILITHIUM5"))) - oqs_oid_alg_list[12 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_MLDSA44"))) - oqs_oid_alg_list[14 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[0 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_P256_MLDSA44"))) - oqs_oid_alg_list[16 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[2 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_RSA3072_MLDSA44"))) - oqs_oid_alg_list[18 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[4 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_MLDSA65"))) - oqs_oid_alg_list[20 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[6 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_P384_MLDSA65"))) - oqs_oid_alg_list[22 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[8 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_MLDSA87"))) - oqs_oid_alg_list[24 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[10 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_P521_MLDSA87"))) - oqs_oid_alg_list[26 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[12 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_FALCON512"))) - oqs_oid_alg_list[28 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[14 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_P256_FALCON512"))) - oqs_oid_alg_list[30 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[16 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_RSA3072_FALCON512"))) - oqs_oid_alg_list[32 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[18 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_FALCONPADDED512"))) - oqs_oid_alg_list[34 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[20 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_P256_FALCONPADDED512"))) - oqs_oid_alg_list[36 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[22 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_RSA3072_FALCONPADDED512"))) - oqs_oid_alg_list[38 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[24 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_FALCON1024"))) - oqs_oid_alg_list[40 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[26 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_P521_FALCON1024"))) - oqs_oid_alg_list[42 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[28 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_FALCONPADDED1024"))) - oqs_oid_alg_list[44 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[30 + OQS_KEMOID_CNT] = envval; if ((envval = getenv("OQS_OID_P521_FALCONPADDED1024"))) - oqs_oid_alg_list[46 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_SPHINCSSHA2128FSIMPLE"))) - oqs_oid_alg_list[48 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_P256_SPHINCSSHA2128FSIMPLE"))) - oqs_oid_alg_list[50 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_RSA3072_SPHINCSSHA2128FSIMPLE"))) - oqs_oid_alg_list[52 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_SPHINCSSHA2128SSIMPLE"))) - oqs_oid_alg_list[54 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_P256_SPHINCSSHA2128SSIMPLE"))) - oqs_oid_alg_list[56 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_RSA3072_SPHINCSSHA2128SSIMPLE"))) - oqs_oid_alg_list[58 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_SPHINCSSHA2192FSIMPLE"))) - oqs_oid_alg_list[60 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_P384_SPHINCSSHA2192FSIMPLE"))) - oqs_oid_alg_list[62 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_SPHINCSSHAKE128FSIMPLE"))) - oqs_oid_alg_list[64 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_P256_SPHINCSSHAKE128FSIMPLE"))) - oqs_oid_alg_list[66 + OQS_KEMOID_CNT] = envval; - if ((envval = getenv("OQS_OID_RSA3072_SPHINCSSHAKE128FSIMPLE"))) - oqs_oid_alg_list[68 + OQS_KEMOID_CNT] = envval; + oqs_oid_alg_list[32 + OQS_KEMOID_CNT] = envval; } ///// OQS_TEMPLATE_FRAGMENT_OID_PATCHING_END return 1; } @@ -485,218 +413,139 @@ int oqs_patch_encodings(void) ///// OQS_TEMPLATE_FRAGMENT_ENCODING_PATCHING_START { const char *envval = NULL; - if ((envval = getenv("OQS_ENCODING_DILITHIUM2"))) - oqs_alg_encoding_list[0] = envval; - if ((envval = getenv("OQS_ENCODING_DILITHIUM2_ALGNAME"))) - oqs_alg_encoding_list[1] = envval; - if ((envval = getenv("OQS_ENCODING_P256_DILITHIUM2"))) - oqs_alg_encoding_list[2] = envval; - if ((envval = getenv("OQS_ENCODING_P256_DILITHIUM2_ALGNAME"))) - oqs_alg_encoding_list[3] = envval; - if ((envval = getenv("OQS_ENCODING_RSA3072_DILITHIUM2"))) - oqs_alg_encoding_list[4] = envval; - if ((envval = getenv("OQS_ENCODING_RSA3072_DILITHIUM2_ALGNAME"))) - oqs_alg_encoding_list[5] = envval; - if ((envval = getenv("OQS_ENCODING_DILITHIUM3"))) - oqs_alg_encoding_list[6] = envval; - if ((envval = getenv("OQS_ENCODING_DILITHIUM3_ALGNAME"))) - oqs_alg_encoding_list[7] = envval; - if ((envval = getenv("OQS_ENCODING_P384_DILITHIUM3"))) - oqs_alg_encoding_list[8] = envval; - if ((envval = getenv("OQS_ENCODING_P384_DILITHIUM3_ALGNAME"))) - oqs_alg_encoding_list[9] = envval; - if ((envval = getenv("OQS_ENCODING_DILITHIUM5"))) - oqs_alg_encoding_list[10] = envval; - if ((envval = getenv("OQS_ENCODING_DILITHIUM5_ALGNAME"))) - oqs_alg_encoding_list[11] = envval; - if ((envval = getenv("OQS_ENCODING_P521_DILITHIUM5"))) - oqs_alg_encoding_list[12] = envval; - if ((envval = getenv("OQS_ENCODING_P521_DILITHIUM5_ALGNAME"))) - oqs_alg_encoding_list[13] = envval; if ((envval = getenv("OQS_ENCODING_MLDSA44"))) - oqs_alg_encoding_list[14] = envval; + oqs_alg_encoding_list[0] = envval; if ((envval = getenv("OQS_ENCODING_MLDSA44_ALGNAME"))) - oqs_alg_encoding_list[15] = envval; + oqs_alg_encoding_list[1] = envval; if ((envval = getenv("OQS_ENCODING_P256_MLDSA44"))) - oqs_alg_encoding_list[16] = envval; + oqs_alg_encoding_list[2] = envval; if ((envval = getenv("OQS_ENCODING_P256_MLDSA44_ALGNAME"))) - oqs_alg_encoding_list[17] = envval; + oqs_alg_encoding_list[3] = envval; if ((envval = getenv("OQS_ENCODING_RSA3072_MLDSA44"))) - oqs_alg_encoding_list[18] = envval; + oqs_alg_encoding_list[4] = envval; if ((envval = getenv("OQS_ENCODING_RSA3072_MLDSA44_ALGNAME"))) - oqs_alg_encoding_list[19] = envval; + oqs_alg_encoding_list[5] = envval; if (getenv("OQS_ENCODING_MLDSA44_PSS2048")) - oqs_alg_encoding_list[20] = getenv("OQS_ENCODING_MLDSA44_PSS2048"); + oqs_alg_encoding_list[6] = getenv("OQS_ENCODING_MLDSA44_PSS2048"); if (getenv("OQS_ENCODING_MLDSA44_PSS2048_ALGNAME")) - oqs_alg_encoding_list[21] + oqs_alg_encoding_list[7] = getenv("OQS_ENCODING_MLDSA44_PSS2048_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA44_RSA2048")) - oqs_alg_encoding_list[22] = getenv("OQS_ENCODING_MLDSA44_RSA2048"); + oqs_alg_encoding_list[8] = getenv("OQS_ENCODING_MLDSA44_RSA2048"); if (getenv("OQS_ENCODING_MLDSA44_RSA2048_ALGNAME")) - oqs_alg_encoding_list[23] + oqs_alg_encoding_list[9] = getenv("OQS_ENCODING_MLDSA44_RSA2048_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA44_ED25519")) - oqs_alg_encoding_list[24] = getenv("OQS_ENCODING_MLDSA44_ED25519"); + oqs_alg_encoding_list[10] = getenv("OQS_ENCODING_MLDSA44_ED25519"); if (getenv("OQS_ENCODING_MLDSA44_ED25519_ALGNAME")) - oqs_alg_encoding_list[25] + oqs_alg_encoding_list[11] = getenv("OQS_ENCODING_MLDSA44_ED25519_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA44_P256")) - oqs_alg_encoding_list[26] = getenv("OQS_ENCODING_MLDSA44_P256"); + oqs_alg_encoding_list[12] = getenv("OQS_ENCODING_MLDSA44_P256"); if (getenv("OQS_ENCODING_MLDSA44_P256_ALGNAME")) - oqs_alg_encoding_list[27] + oqs_alg_encoding_list[13] = getenv("OQS_ENCODING_MLDSA44_P256_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA44_BP256")) - oqs_alg_encoding_list[28] = getenv("OQS_ENCODING_MLDSA44_BP256"); + oqs_alg_encoding_list[14] = getenv("OQS_ENCODING_MLDSA44_BP256"); if (getenv("OQS_ENCODING_MLDSA44_BP256_ALGNAME")) - oqs_alg_encoding_list[29] + oqs_alg_encoding_list[15] = getenv("OQS_ENCODING_MLDSA44_BP256_ALGNAME"); if ((envval = getenv("OQS_ENCODING_MLDSA65"))) - oqs_alg_encoding_list[30] = envval; + oqs_alg_encoding_list[16] = envval; if ((envval = getenv("OQS_ENCODING_MLDSA65_ALGNAME"))) - oqs_alg_encoding_list[31] = envval; + oqs_alg_encoding_list[17] = envval; if ((envval = getenv("OQS_ENCODING_P384_MLDSA65"))) - oqs_alg_encoding_list[32] = envval; + oqs_alg_encoding_list[18] = envval; if ((envval = getenv("OQS_ENCODING_P384_MLDSA65_ALGNAME"))) - oqs_alg_encoding_list[33] = envval; + oqs_alg_encoding_list[19] = envval; if (getenv("OQS_ENCODING_MLDSA65_PSS3072")) - oqs_alg_encoding_list[34] = getenv("OQS_ENCODING_MLDSA65_PSS3072"); + oqs_alg_encoding_list[20] = getenv("OQS_ENCODING_MLDSA65_PSS3072"); if (getenv("OQS_ENCODING_MLDSA65_PSS3072_ALGNAME")) - oqs_alg_encoding_list[35] + oqs_alg_encoding_list[21] = getenv("OQS_ENCODING_MLDSA65_PSS3072_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA65_RSA3072")) - oqs_alg_encoding_list[36] = getenv("OQS_ENCODING_MLDSA65_RSA3072"); + oqs_alg_encoding_list[22] = getenv("OQS_ENCODING_MLDSA65_RSA3072"); if (getenv("OQS_ENCODING_MLDSA65_RSA3072_ALGNAME")) - oqs_alg_encoding_list[37] + oqs_alg_encoding_list[23] = getenv("OQS_ENCODING_MLDSA65_RSA3072_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA65_P256")) - oqs_alg_encoding_list[38] = getenv("OQS_ENCODING_MLDSA65_P256"); + oqs_alg_encoding_list[24] = getenv("OQS_ENCODING_MLDSA65_P256"); if (getenv("OQS_ENCODING_MLDSA65_P256_ALGNAME")) - oqs_alg_encoding_list[39] + oqs_alg_encoding_list[25] = getenv("OQS_ENCODING_MLDSA65_P256_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA65_BP256")) - oqs_alg_encoding_list[40] = getenv("OQS_ENCODING_MLDSA65_BP256"); + oqs_alg_encoding_list[26] = getenv("OQS_ENCODING_MLDSA65_BP256"); if (getenv("OQS_ENCODING_MLDSA65_BP256_ALGNAME")) - oqs_alg_encoding_list[41] + oqs_alg_encoding_list[27] = getenv("OQS_ENCODING_MLDSA65_BP256_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA65_ED25519")) - oqs_alg_encoding_list[42] = getenv("OQS_ENCODING_MLDSA65_ED25519"); + oqs_alg_encoding_list[28] = getenv("OQS_ENCODING_MLDSA65_ED25519"); if (getenv("OQS_ENCODING_MLDSA65_ED25519_ALGNAME")) - oqs_alg_encoding_list[43] + oqs_alg_encoding_list[29] = getenv("OQS_ENCODING_MLDSA65_ED25519_ALGNAME"); if ((envval = getenv("OQS_ENCODING_MLDSA87"))) - oqs_alg_encoding_list[44] = envval; + oqs_alg_encoding_list[30] = envval; if ((envval = getenv("OQS_ENCODING_MLDSA87_ALGNAME"))) - oqs_alg_encoding_list[45] = envval; + oqs_alg_encoding_list[31] = envval; if ((envval = getenv("OQS_ENCODING_P521_MLDSA87"))) - oqs_alg_encoding_list[46] = envval; + oqs_alg_encoding_list[32] = envval; if ((envval = getenv("OQS_ENCODING_P521_MLDSA87_ALGNAME"))) - oqs_alg_encoding_list[47] = envval; + oqs_alg_encoding_list[33] = envval; if (getenv("OQS_ENCODING_MLDSA87_P384")) - oqs_alg_encoding_list[48] = getenv("OQS_ENCODING_MLDSA87_P384"); + oqs_alg_encoding_list[34] = getenv("OQS_ENCODING_MLDSA87_P384"); if (getenv("OQS_ENCODING_MLDSA87_P384_ALGNAME")) - oqs_alg_encoding_list[49] + oqs_alg_encoding_list[35] = getenv("OQS_ENCODING_MLDSA87_P384_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA87_BP384")) - oqs_alg_encoding_list[50] = getenv("OQS_ENCODING_MLDSA87_BP384"); + oqs_alg_encoding_list[36] = getenv("OQS_ENCODING_MLDSA87_BP384"); if (getenv("OQS_ENCODING_MLDSA87_BP384_ALGNAME")) - oqs_alg_encoding_list[51] + oqs_alg_encoding_list[37] = getenv("OQS_ENCODING_MLDSA87_BP384_ALGNAME"); if (getenv("OQS_ENCODING_MLDSA87_ED448")) - oqs_alg_encoding_list[52] = getenv("OQS_ENCODING_MLDSA87_ED448"); + oqs_alg_encoding_list[38] = getenv("OQS_ENCODING_MLDSA87_ED448"); if (getenv("OQS_ENCODING_MLDSA87_ED448_ALGNAME")) - oqs_alg_encoding_list[53] + oqs_alg_encoding_list[39] = getenv("OQS_ENCODING_MLDSA87_ED448_ALGNAME"); if ((envval = getenv("OQS_ENCODING_FALCON512"))) - oqs_alg_encoding_list[54] = envval; + oqs_alg_encoding_list[40] = envval; if ((envval = getenv("OQS_ENCODING_FALCON512_ALGNAME"))) - oqs_alg_encoding_list[55] = envval; + oqs_alg_encoding_list[41] = envval; if ((envval = getenv("OQS_ENCODING_P256_FALCON512"))) - oqs_alg_encoding_list[56] = envval; + oqs_alg_encoding_list[42] = envval; if ((envval = getenv("OQS_ENCODING_P256_FALCON512_ALGNAME"))) - oqs_alg_encoding_list[57] = envval; + oqs_alg_encoding_list[43] = envval; if ((envval = getenv("OQS_ENCODING_RSA3072_FALCON512"))) - oqs_alg_encoding_list[58] = envval; + oqs_alg_encoding_list[44] = envval; if ((envval = getenv("OQS_ENCODING_RSA3072_FALCON512_ALGNAME"))) - oqs_alg_encoding_list[59] = envval; + oqs_alg_encoding_list[45] = envval; if ((envval = getenv("OQS_ENCODING_FALCONPADDED512"))) - oqs_alg_encoding_list[60] = envval; + oqs_alg_encoding_list[46] = envval; if ((envval = getenv("OQS_ENCODING_FALCONPADDED512_ALGNAME"))) - oqs_alg_encoding_list[61] = envval; + oqs_alg_encoding_list[47] = envval; if ((envval = getenv("OQS_ENCODING_P256_FALCONPADDED512"))) - oqs_alg_encoding_list[62] = envval; + oqs_alg_encoding_list[48] = envval; if ((envval = getenv("OQS_ENCODING_P256_FALCONPADDED512_ALGNAME"))) - oqs_alg_encoding_list[63] = envval; + oqs_alg_encoding_list[49] = envval; if ((envval = getenv("OQS_ENCODING_RSA3072_FALCONPADDED512"))) - oqs_alg_encoding_list[64] = envval; + oqs_alg_encoding_list[50] = envval; if ((envval = getenv("OQS_ENCODING_RSA3072_FALCONPADDED512_ALGNAME"))) - oqs_alg_encoding_list[65] = envval; + oqs_alg_encoding_list[51] = envval; if ((envval = getenv("OQS_ENCODING_FALCON1024"))) - oqs_alg_encoding_list[66] = envval; + oqs_alg_encoding_list[52] = envval; if ((envval = getenv("OQS_ENCODING_FALCON1024_ALGNAME"))) - oqs_alg_encoding_list[67] = envval; + oqs_alg_encoding_list[53] = envval; if ((envval = getenv("OQS_ENCODING_P521_FALCON1024"))) - oqs_alg_encoding_list[68] = envval; + oqs_alg_encoding_list[54] = envval; if ((envval = getenv("OQS_ENCODING_P521_FALCON1024_ALGNAME"))) - oqs_alg_encoding_list[69] = envval; + oqs_alg_encoding_list[55] = envval; if ((envval = getenv("OQS_ENCODING_FALCONPADDED1024"))) - oqs_alg_encoding_list[70] = envval; + oqs_alg_encoding_list[56] = envval; if ((envval = getenv("OQS_ENCODING_FALCONPADDED1024_ALGNAME"))) - oqs_alg_encoding_list[71] = envval; + oqs_alg_encoding_list[57] = envval; if ((envval = getenv("OQS_ENCODING_P521_FALCONPADDED1024"))) - oqs_alg_encoding_list[72] = envval; + oqs_alg_encoding_list[58] = envval; if ((envval = getenv("OQS_ENCODING_P521_FALCONPADDED1024_ALGNAME"))) - oqs_alg_encoding_list[73] = envval; - if ((envval = getenv("OQS_ENCODING_SPHINCSSHA2128FSIMPLE"))) - oqs_alg_encoding_list[74] = envval; - if ((envval = getenv("OQS_ENCODING_SPHINCSSHA2128FSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[75] = envval; - if ((envval = getenv("OQS_ENCODING_P256_SPHINCSSHA2128FSIMPLE"))) - oqs_alg_encoding_list[76] = envval; - if ((envval - = getenv("OQS_ENCODING_P256_SPHINCSSHA2128FSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[77] = envval; - if ((envval = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128FSIMPLE"))) - oqs_alg_encoding_list[78] = envval; - if ((envval - = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128FSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[79] = envval; - if ((envval = getenv("OQS_ENCODING_SPHINCSSHA2128SSIMPLE"))) - oqs_alg_encoding_list[80] = envval; - if ((envval = getenv("OQS_ENCODING_SPHINCSSHA2128SSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[81] = envval; - if ((envval = getenv("OQS_ENCODING_P256_SPHINCSSHA2128SSIMPLE"))) - oqs_alg_encoding_list[82] = envval; - if ((envval - = getenv("OQS_ENCODING_P256_SPHINCSSHA2128SSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[83] = envval; - if ((envval = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128SSIMPLE"))) - oqs_alg_encoding_list[84] = envval; - if ((envval - = getenv("OQS_ENCODING_RSA3072_SPHINCSSHA2128SSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[85] = envval; - if ((envval = getenv("OQS_ENCODING_SPHINCSSHA2192FSIMPLE"))) - oqs_alg_encoding_list[86] = envval; - if ((envval = getenv("OQS_ENCODING_SPHINCSSHA2192FSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[87] = envval; - if ((envval = getenv("OQS_ENCODING_P384_SPHINCSSHA2192FSIMPLE"))) - oqs_alg_encoding_list[88] = envval; - if ((envval - = getenv("OQS_ENCODING_P384_SPHINCSSHA2192FSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[89] = envval; - if ((envval = getenv("OQS_ENCODING_SPHINCSSHAKE128FSIMPLE"))) - oqs_alg_encoding_list[90] = envval; - if ((envval = getenv("OQS_ENCODING_SPHINCSSHAKE128FSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[91] = envval; - if ((envval = getenv("OQS_ENCODING_P256_SPHINCSSHAKE128FSIMPLE"))) - oqs_alg_encoding_list[92] = envval; - if ((envval - = getenv("OQS_ENCODING_P256_SPHINCSSHAKE128FSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[93] = envval; - if ((envval = getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE"))) - oqs_alg_encoding_list[94] = envval; - if ((envval - = getenv("OQS_ENCODING_RSA3072_SPHINCSSHAKE128FSIMPLE_ALGNAME"))) - oqs_alg_encoding_list[95] = envval; + oqs_alg_encoding_list[59] = envval; } ///// OQS_TEMPLATE_FRAGMENT_ENCODING_PATCHING_END return 1; @@ -742,19 +591,6 @@ static const OSSL_PARAM oqsprovider_param_types[] static const OSSL_ALGORITHM oqsprovider_signatures[] = { ///// OQS_TEMPLATE_FRAGMENT_SIG_FUNCTIONS_START -#ifdef OQS_ENABLE_SIG_dilithium_2 - SIGALG("dilithium2", 128, oqs_signature_functions), - SIGALG("p256_dilithium2", 128, oqs_signature_functions), - SIGALG("rsa3072_dilithium2", 128, oqs_signature_functions), -#endif -#ifdef OQS_ENABLE_SIG_dilithium_3 - SIGALG("dilithium3", 192, oqs_signature_functions), - SIGALG("p384_dilithium3", 192, oqs_signature_functions), -#endif -#ifdef OQS_ENABLE_SIG_dilithium_5 - SIGALG("dilithium5", 256, oqs_signature_functions), - SIGALG("p521_dilithium5", 256, oqs_signature_functions), -#endif #ifdef OQS_ENABLE_SIG_ml_dsa_44 SIGALG("mldsa44", 128, oqs_signature_functions), SIGALG("p256_mldsa44", 128, oqs_signature_functions), @@ -798,25 +634,6 @@ static const OSSL_ALGORITHM oqsprovider_signatures[] = { #ifdef OQS_ENABLE_SIG_falcon_padded_1024 SIGALG("falconpadded1024", 256, oqs_signature_functions), SIGALG("p521_falconpadded1024", 256, oqs_signature_functions), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_128f_simple - SIGALG("sphincssha2128fsimple", 128, oqs_signature_functions), - SIGALG("p256_sphincssha2128fsimple", 128, oqs_signature_functions), - SIGALG("rsa3072_sphincssha2128fsimple", 128, oqs_signature_functions), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_128s_simple - SIGALG("sphincssha2128ssimple", 128, oqs_signature_functions), - SIGALG("p256_sphincssha2128ssimple", 128, oqs_signature_functions), - SIGALG("rsa3072_sphincssha2128ssimple", 128, oqs_signature_functions), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_192f_simple - SIGALG("sphincssha2192fsimple", 192, oqs_signature_functions), - SIGALG("p384_sphincssha2192fsimple", 192, oqs_signature_functions), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_shake_128f_simple - SIGALG("sphincsshake128fsimple", 128, oqs_signature_functions), - SIGALG("p256_sphincsshake128fsimple", 128, oqs_signature_functions), - SIGALG("rsa3072_sphincsshake128fsimple", 128, oqs_signature_functions), #endif ///// OQS_TEMPLATE_FRAGMENT_SIG_FUNCTIONS_END {NULL, NULL, NULL}}; @@ -922,19 +739,6 @@ static const OSSL_ALGORITHM oqsprovider_keymgmt[] ///// OQS_TEMPLATE_FRAGMENT_KEYMGMT_FUNCTIONS_START // clang-format off -#ifdef OQS_ENABLE_SIG_dilithium_2 - SIGALG("dilithium2", 128, oqs_dilithium2_keymgmt_functions), - SIGALG("p256_dilithium2", 128, oqs_p256_dilithium2_keymgmt_functions), - SIGALG("rsa3072_dilithium2", 128, oqs_rsa3072_dilithium2_keymgmt_functions), -#endif -#ifdef OQS_ENABLE_SIG_dilithium_3 - SIGALG("dilithium3", 192, oqs_dilithium3_keymgmt_functions), - SIGALG("p384_dilithium3", 192, oqs_p384_dilithium3_keymgmt_functions), -#endif -#ifdef OQS_ENABLE_SIG_dilithium_5 - SIGALG("dilithium5", 256, oqs_dilithium5_keymgmt_functions), - SIGALG("p521_dilithium5", 256, oqs_p521_dilithium5_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), @@ -979,25 +783,6 @@ static const OSSL_ALGORITHM oqsprovider_keymgmt[] SIGALG("falconpadded1024", 256, oqs_falconpadded1024_keymgmt_functions), SIGALG("p521_falconpadded1024", 256, oqs_p521_falconpadded1024_keymgmt_functions), #endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_128f_simple - SIGALG("sphincssha2128fsimple", 128, oqs_sphincssha2128fsimple_keymgmt_functions), - SIGALG("p256_sphincssha2128fsimple", 128, oqs_p256_sphincssha2128fsimple_keymgmt_functions), - SIGALG("rsa3072_sphincssha2128fsimple", 128, oqs_rsa3072_sphincssha2128fsimple_keymgmt_functions), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_128s_simple - SIGALG("sphincssha2128ssimple", 128, oqs_sphincssha2128ssimple_keymgmt_functions), - SIGALG("p256_sphincssha2128ssimple", 128, oqs_p256_sphincssha2128ssimple_keymgmt_functions), - SIGALG("rsa3072_sphincssha2128ssimple", 128, oqs_rsa3072_sphincssha2128ssimple_keymgmt_functions), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_sha2_192f_simple - SIGALG("sphincssha2192fsimple", 192, oqs_sphincssha2192fsimple_keymgmt_functions), - SIGALG("p384_sphincssha2192fsimple", 192, oqs_p384_sphincssha2192fsimple_keymgmt_functions), -#endif -#ifdef OQS_ENABLE_SIG_sphincs_shake_128f_simple - SIGALG("sphincsshake128fsimple", 128, oqs_sphincsshake128fsimple_keymgmt_functions), - SIGALG("p256_sphincsshake128fsimple", 128, oqs_p256_sphincsshake128fsimple_keymgmt_functions), - SIGALG("rsa3072_sphincsshake128fsimple", 128, oqs_rsa3072_sphincsshake128fsimple_keymgmt_functions), -#endif #ifdef OQS_ENABLE_KEM_frodokem_640_aes KEMKMALG(frodo640aes, 128) diff --git a/oqsprov/oqsprov_capabilities.c b/oqsprov/oqsprov_capabilities.c index 551f7598..74f4ed5b 100644 --- a/oqsprov/oqsprov_capabilities.c +++ b/oqsprov/oqsprov_capabilities.c @@ -265,30 +265,21 @@ typedef struct oqs_sigalg_constants_st { static OQS_SIGALG_CONSTANTS oqs_sigalg_list[] = { // ad-hoc assignments - take from OQS generate data structures ///// OQS_TEMPLATE_FRAGMENT_SIGALG_ASSIGNMENTS_START - {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}, {0xfed0, 128, TLS1_3_VERSION, 0}, - {0xfed3, 128, TLS1_3_VERSION, 0}, {0xfed4, 128, TLS1_3_VERSION, 0}, - {0xfee1, 128, TLS1_3_VERSION, 0}, {0xfee2, 128, TLS1_3_VERSION, 0}, - {0xfee3, 128, TLS1_3_VERSION, 0}, {0xfee4, 128, TLS1_3_VERSION, 0}, - {0xfee5, 128, TLS1_3_VERSION, 0}, {0xfed1, 192, TLS1_3_VERSION, 0}, - {0xfed5, 192, TLS1_3_VERSION, 0}, {0xfee6, 192, TLS1_3_VERSION, 0}, - {0xfee7, 192, TLS1_3_VERSION, 0}, {0xfee8, 192, TLS1_3_VERSION, 0}, - {0xfee9, 192, TLS1_3_VERSION, 0}, {0xfeea, 192, TLS1_3_VERSION, 0}, - {0xfed2, 256, TLS1_3_VERSION, 0}, {0xfed6, 256, TLS1_3_VERSION, 0}, - {0xfeeb, 256, TLS1_3_VERSION, 0}, {0xfeec, 256, TLS1_3_VERSION, 0}, - {0xfeed, 256, TLS1_3_VERSION, 0}, {0xfed7, 128, TLS1_3_VERSION, 0}, - {0xfed8, 128, TLS1_3_VERSION, 0}, {0xfed9, 128, TLS1_3_VERSION, 0}, - {0xfedc, 128, TLS1_3_VERSION, 0}, {0xfedd, 128, TLS1_3_VERSION, 0}, - {0xfede, 128, TLS1_3_VERSION, 0}, {0xfeda, 256, TLS1_3_VERSION, 0}, - {0xfedb, 256, TLS1_3_VERSION, 0}, {0xfedf, 256, TLS1_3_VERSION, 0}, - {0xfee0, 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}, + {0xfed0, 128, TLS1_3_VERSION, 0}, {0xfed3, 128, TLS1_3_VERSION, 0}, + {0xfed4, 128, TLS1_3_VERSION, 0}, {0xfee1, 128, TLS1_3_VERSION, 0}, + {0xfee2, 128, TLS1_3_VERSION, 0}, {0xfee3, 128, TLS1_3_VERSION, 0}, + {0xfee4, 128, TLS1_3_VERSION, 0}, {0xfee5, 128, TLS1_3_VERSION, 0}, + {0xfed1, 192, TLS1_3_VERSION, 0}, {0xfed5, 192, TLS1_3_VERSION, 0}, + {0xfee6, 192, TLS1_3_VERSION, 0}, {0xfee7, 192, TLS1_3_VERSION, 0}, + {0xfee8, 192, TLS1_3_VERSION, 0}, {0xfee9, 192, TLS1_3_VERSION, 0}, + {0xfeea, 192, TLS1_3_VERSION, 0}, {0xfed2, 256, TLS1_3_VERSION, 0}, + {0xfed6, 256, TLS1_3_VERSION, 0}, {0xfeeb, 256, TLS1_3_VERSION, 0}, + {0xfeec, 256, TLS1_3_VERSION, 0}, {0xfeed, 256, TLS1_3_VERSION, 0}, + {0xfed7, 128, TLS1_3_VERSION, 0}, {0xfed8, 128, TLS1_3_VERSION, 0}, + {0xfed9, 128, TLS1_3_VERSION, 0}, {0xfedc, 128, TLS1_3_VERSION, 0}, + {0xfedd, 128, TLS1_3_VERSION, 0}, {0xfede, 128, TLS1_3_VERSION, 0}, + {0xfeda, 256, TLS1_3_VERSION, 0}, {0xfedb, 256, TLS1_3_VERSION, 0}, + {0xfedf, 256, TLS1_3_VERSION, 0}, {0xfee0, 256, TLS1_3_VERSION, 0}, ///// OQS_TEMPLATE_FRAGMENT_SIGALG_ASSIGNMENTS_END }; @@ -434,147 +425,93 @@ int oqs_patch_codepoints() if (getenv("OQS_CODEPOINT_P521_HQC256")) oqs_group_list[52].group_id = atoi(getenv("OQS_CODEPOINT_P521_HQC256")); - if (getenv("OQS_CODEPOINT_DILITHIUM2")) - oqs_sigalg_list[0].code_point - = atoi(getenv("OQS_CODEPOINT_DILITHIUM2")); - if (getenv("OQS_CODEPOINT_P256_DILITHIUM2")) - oqs_sigalg_list[1].code_point - = atoi(getenv("OQS_CODEPOINT_P256_DILITHIUM2")); - if (getenv("OQS_CODEPOINT_RSA3072_DILITHIUM2")) - oqs_sigalg_list[2].code_point - = atoi(getenv("OQS_CODEPOINT_RSA3072_DILITHIUM2")); - if (getenv("OQS_CODEPOINT_DILITHIUM3")) - oqs_sigalg_list[3].code_point - = atoi(getenv("OQS_CODEPOINT_DILITHIUM3")); - if (getenv("OQS_CODEPOINT_P384_DILITHIUM3")) - oqs_sigalg_list[4].code_point - = atoi(getenv("OQS_CODEPOINT_P384_DILITHIUM3")); - if (getenv("OQS_CODEPOINT_DILITHIUM5")) - oqs_sigalg_list[5].code_point - = atoi(getenv("OQS_CODEPOINT_DILITHIUM5")); - 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")); + oqs_sigalg_list[0].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA44")); if (getenv("OQS_CODEPOINT_P256_MLDSA44")) - oqs_sigalg_list[8].code_point + oqs_sigalg_list[1].code_point = atoi(getenv("OQS_CODEPOINT_P256_MLDSA44")); if (getenv("OQS_CODEPOINT_RSA3072_MLDSA44")) - oqs_sigalg_list[9].code_point + oqs_sigalg_list[2].code_point = atoi(getenv("OQS_CODEPOINT_RSA3072_MLDSA44")); if (getenv("OQS_CODEPOINT_MLDSA44_PSS2048")) - oqs_sigalg_list[10].code_point + oqs_sigalg_list[3].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA44_PSS2048")); if (getenv("OQS_CODEPOINT_MLDSA44_RSA2048")) - oqs_sigalg_list[11].code_point + oqs_sigalg_list[4].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA44_RSA2048")); if (getenv("OQS_CODEPOINT_MLDSA44_ED25519")) - oqs_sigalg_list[12].code_point + oqs_sigalg_list[5].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA44_ED25519")); if (getenv("OQS_CODEPOINT_MLDSA44_P256")) - oqs_sigalg_list[13].code_point + oqs_sigalg_list[6].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA44_P256")); if (getenv("OQS_CODEPOINT_MLDSA44_BP256")) - oqs_sigalg_list[14].code_point + oqs_sigalg_list[7].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA44_BP256")); if (getenv("OQS_CODEPOINT_MLDSA65")) - oqs_sigalg_list[15].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA65")); + oqs_sigalg_list[8].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA65")); if (getenv("OQS_CODEPOINT_P384_MLDSA65")) - oqs_sigalg_list[16].code_point + oqs_sigalg_list[9].code_point = atoi(getenv("OQS_CODEPOINT_P384_MLDSA65")); if (getenv("OQS_CODEPOINT_MLDSA65_PSS3072")) - oqs_sigalg_list[17].code_point + oqs_sigalg_list[10].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA65_PSS3072")); if (getenv("OQS_CODEPOINT_MLDSA65_RSA3072")) - oqs_sigalg_list[18].code_point + oqs_sigalg_list[11].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA65_RSA3072")); if (getenv("OQS_CODEPOINT_MLDSA65_P256")) - oqs_sigalg_list[19].code_point + oqs_sigalg_list[12].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA65_P256")); if (getenv("OQS_CODEPOINT_MLDSA65_BP256")) - oqs_sigalg_list[20].code_point + oqs_sigalg_list[13].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA65_BP256")); if (getenv("OQS_CODEPOINT_MLDSA65_ED25519")) - oqs_sigalg_list[21].code_point + oqs_sigalg_list[14].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA65_ED25519")); if (getenv("OQS_CODEPOINT_MLDSA87")) - oqs_sigalg_list[22].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA87")); + oqs_sigalg_list[15].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA87")); if (getenv("OQS_CODEPOINT_P521_MLDSA87")) - oqs_sigalg_list[23].code_point + oqs_sigalg_list[16].code_point = atoi(getenv("OQS_CODEPOINT_P521_MLDSA87")); if (getenv("OQS_CODEPOINT_MLDSA87_P384")) - oqs_sigalg_list[24].code_point + oqs_sigalg_list[17].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA87_P384")); if (getenv("OQS_CODEPOINT_MLDSA87_BP384")) - oqs_sigalg_list[25].code_point + oqs_sigalg_list[18].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA87_BP384")); if (getenv("OQS_CODEPOINT_MLDSA87_ED448")) - oqs_sigalg_list[26].code_point + oqs_sigalg_list[19].code_point = atoi(getenv("OQS_CODEPOINT_MLDSA87_ED448")); if (getenv("OQS_CODEPOINT_FALCON512")) - oqs_sigalg_list[27].code_point + oqs_sigalg_list[20].code_point = atoi(getenv("OQS_CODEPOINT_FALCON512")); if (getenv("OQS_CODEPOINT_P256_FALCON512")) - oqs_sigalg_list[28].code_point + oqs_sigalg_list[21].code_point = atoi(getenv("OQS_CODEPOINT_P256_FALCON512")); if (getenv("OQS_CODEPOINT_RSA3072_FALCON512")) - oqs_sigalg_list[29].code_point + oqs_sigalg_list[22].code_point = atoi(getenv("OQS_CODEPOINT_RSA3072_FALCON512")); if (getenv("OQS_CODEPOINT_FALCONPADDED512")) - oqs_sigalg_list[30].code_point + oqs_sigalg_list[23].code_point = atoi(getenv("OQS_CODEPOINT_FALCONPADDED512")); if (getenv("OQS_CODEPOINT_P256_FALCONPADDED512")) - oqs_sigalg_list[31].code_point + oqs_sigalg_list[24].code_point = atoi(getenv("OQS_CODEPOINT_P256_FALCONPADDED512")); if (getenv("OQS_CODEPOINT_RSA3072_FALCONPADDED512")) - oqs_sigalg_list[32].code_point + oqs_sigalg_list[25].code_point = atoi(getenv("OQS_CODEPOINT_RSA3072_FALCONPADDED512")); if (getenv("OQS_CODEPOINT_FALCON1024")) - oqs_sigalg_list[33].code_point + oqs_sigalg_list[26].code_point = atoi(getenv("OQS_CODEPOINT_FALCON1024")); if (getenv("OQS_CODEPOINT_P521_FALCON1024")) - oqs_sigalg_list[34].code_point + oqs_sigalg_list[27].code_point = atoi(getenv("OQS_CODEPOINT_P521_FALCON1024")); if (getenv("OQS_CODEPOINT_FALCONPADDED1024")) - oqs_sigalg_list[35].code_point + oqs_sigalg_list[28].code_point = atoi(getenv("OQS_CODEPOINT_FALCONPADDED1024")); if (getenv("OQS_CODEPOINT_P521_FALCONPADDED1024")) - oqs_sigalg_list[36].code_point + oqs_sigalg_list[29].code_point = atoi(getenv("OQS_CODEPOINT_P521_FALCONPADDED1024")); - if (getenv("OQS_CODEPOINT_SPHINCSSHA2128FSIMPLE")) - oqs_sigalg_list[37].code_point - = atoi(getenv("OQS_CODEPOINT_SPHINCSSHA2128FSIMPLE")); - if (getenv("OQS_CODEPOINT_P256_SPHINCSSHA2128FSIMPLE")) - oqs_sigalg_list[38].code_point - = atoi(getenv("OQS_CODEPOINT_P256_SPHINCSSHA2128FSIMPLE")); - if (getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHA2128FSIMPLE")) - oqs_sigalg_list[39].code_point - = atoi(getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHA2128FSIMPLE")); - if (getenv("OQS_CODEPOINT_SPHINCSSHA2128SSIMPLE")) - oqs_sigalg_list[40].code_point - = atoi(getenv("OQS_CODEPOINT_SPHINCSSHA2128SSIMPLE")); - if (getenv("OQS_CODEPOINT_P256_SPHINCSSHA2128SSIMPLE")) - oqs_sigalg_list[41].code_point - = atoi(getenv("OQS_CODEPOINT_P256_SPHINCSSHA2128SSIMPLE")); - if (getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHA2128SSIMPLE")) - oqs_sigalg_list[42].code_point - = atoi(getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHA2128SSIMPLE")); - if (getenv("OQS_CODEPOINT_SPHINCSSHA2192FSIMPLE")) - oqs_sigalg_list[43].code_point - = atoi(getenv("OQS_CODEPOINT_SPHINCSSHA2192FSIMPLE")); - if (getenv("OQS_CODEPOINT_P384_SPHINCSSHA2192FSIMPLE")) - oqs_sigalg_list[44].code_point - = atoi(getenv("OQS_CODEPOINT_P384_SPHINCSSHA2192FSIMPLE")); - if (getenv("OQS_CODEPOINT_SPHINCSSHAKE128FSIMPLE")) - oqs_sigalg_list[45].code_point - = atoi(getenv("OQS_CODEPOINT_SPHINCSSHAKE128FSIMPLE")); - if (getenv("OQS_CODEPOINT_P256_SPHINCSSHAKE128FSIMPLE")) - oqs_sigalg_list[46].code_point - = atoi(getenv("OQS_CODEPOINT_P256_SPHINCSSHAKE128FSIMPLE")); - if (getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHAKE128FSIMPLE")) - oqs_sigalg_list[47].code_point - = atoi(getenv("OQS_CODEPOINT_RSA3072_SPHINCSSHAKE128FSIMPLE")); ///// OQS_TEMPLATE_FRAGMENT_CODEPOINT_PATCHING_END return 1; } @@ -615,127 +552,74 @@ static int oqs_group_capability(OSSL_CALLBACK *cb, void *arg) static const OSSL_PARAM oqs_param_sigalg_list[][12] = { ///// OQS_TEMPLATE_FRAGMENT_SIGALG_NAMES_START -# ifdef OQS_ENABLE_SIG_dilithium_2 - OQS_SIGALG_ENTRY(dilithium2, dilithium2, dilithium2, - "1.3.6.1.4.1.2.267.7.4.4", 0), - OQS_SIGALG_ENTRY(p256_dilithium2, p256_dilithium2, p256_dilithium2, - "1.3.9999.2.7.1", 1), - OQS_SIGALG_ENTRY(rsa3072_dilithium2, rsa3072_dilithium2, rsa3072_dilithium2, - "1.3.9999.2.7.2", 2), -# endif -# ifdef OQS_ENABLE_SIG_dilithium_3 - OQS_SIGALG_ENTRY(dilithium3, dilithium3, dilithium3, - "1.3.6.1.4.1.2.267.7.6.5", 3), - OQS_SIGALG_ENTRY(p384_dilithium3, p384_dilithium3, p384_dilithium3, - "1.3.9999.2.7.3", 4), -# endif -# ifdef OQS_ENABLE_SIG_dilithium_5 - OQS_SIGALG_ENTRY(dilithium5, dilithium5, dilithium5, - "1.3.6.1.4.1.2.267.7.8.7", 5), - 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(mldsa44, mldsa44, mldsa44, "1.3.6.1.4.1.2.267.12.4.4", 0), OQS_SIGALG_ENTRY(p256_mldsa44, p256_mldsa44, p256_mldsa44, "1.3.9999.7.1", - 8), + 1), OQS_SIGALG_ENTRY(rsa3072_mldsa44, rsa3072_mldsa44, rsa3072_mldsa44, - "1.3.9999.7.2", 9), + "1.3.9999.7.2", 2), OQS_SIGALG_ENTRY(mldsa44_pss2048, mldsa44_pss2048, mldsa44_pss2048, - "2.16.840.1.114027.80.8.1.1", 10), + "2.16.840.1.114027.80.8.1.1", 3), OQS_SIGALG_ENTRY(mldsa44_rsa2048, mldsa44_rsa2048, mldsa44_rsa2048, - "2.16.840.1.114027.80.8.1.2", 11), + "2.16.840.1.114027.80.8.1.2", 4), OQS_SIGALG_ENTRY(mldsa44_ed25519, mldsa44_ed25519, mldsa44_ed25519, - "2.16.840.1.114027.80.8.1.3", 12), + "2.16.840.1.114027.80.8.1.3", 5), OQS_SIGALG_ENTRY(mldsa44_p256, mldsa44_p256, mldsa44_p256, - "2.16.840.1.114027.80.8.1.4", 13), + "2.16.840.1.114027.80.8.1.4", 6), OQS_SIGALG_ENTRY(mldsa44_bp256, mldsa44_bp256, mldsa44_bp256, - "2.16.840.1.114027.80.8.1.5", 14), + "2.16.840.1.114027.80.8.1.5", 7), # 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", 15), + OQS_SIGALG_ENTRY(mldsa65, mldsa65, mldsa65, "1.3.6.1.4.1.2.267.12.6.5", 8), OQS_SIGALG_ENTRY(p384_mldsa65, p384_mldsa65, p384_mldsa65, "1.3.9999.7.3", - 16), + 9), OQS_SIGALG_ENTRY(mldsa65_pss3072, mldsa65_pss3072, mldsa65_pss3072, - "2.16.840.1.114027.80.8.1.6", 17), + "2.16.840.1.114027.80.8.1.6", 10), OQS_SIGALG_ENTRY(mldsa65_rsa3072, mldsa65_rsa3072, mldsa65_rsa3072, - "2.16.840.1.114027.80.8.1.7", 18), + "2.16.840.1.114027.80.8.1.7", 11), OQS_SIGALG_ENTRY(mldsa65_p256, mldsa65_p256, mldsa65_p256, - "2.16.840.1.114027.80.8.1.8", 19), + "2.16.840.1.114027.80.8.1.8", 12), OQS_SIGALG_ENTRY(mldsa65_bp256, mldsa65_bp256, mldsa65_bp256, - "2.16.840.1.114027.80.8.1.9", 20), + "2.16.840.1.114027.80.8.1.9", 13), OQS_SIGALG_ENTRY(mldsa65_ed25519, mldsa65_ed25519, mldsa65_ed25519, - "2.16.840.1.114027.80.8.1.10", 21), + "2.16.840.1.114027.80.8.1.10", 14), # 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", 22), + OQS_SIGALG_ENTRY(mldsa87, mldsa87, mldsa87, "1.3.6.1.4.1.2.267.12.8.7", 15), OQS_SIGALG_ENTRY(p521_mldsa87, p521_mldsa87, p521_mldsa87, "1.3.9999.7.4", - 23), + 16), OQS_SIGALG_ENTRY(mldsa87_p384, mldsa87_p384, mldsa87_p384, - "2.16.840.1.114027.80.8.1.11", 24), + "2.16.840.1.114027.80.8.1.11", 17), OQS_SIGALG_ENTRY(mldsa87_bp384, mldsa87_bp384, mldsa87_bp384, - "2.16.840.1.114027.80.8.1.12", 25), + "2.16.840.1.114027.80.8.1.12", 18), OQS_SIGALG_ENTRY(mldsa87_ed448, mldsa87_ed448, mldsa87_ed448, - "2.16.840.1.114027.80.8.1.13", 26), + "2.16.840.1.114027.80.8.1.13", 19), # endif # ifdef OQS_ENABLE_SIG_falcon_512 - OQS_SIGALG_ENTRY(falcon512, falcon512, falcon512, "1.3.9999.3.11", 27), + OQS_SIGALG_ENTRY(falcon512, falcon512, falcon512, "1.3.9999.3.11", 20), OQS_SIGALG_ENTRY(p256_falcon512, p256_falcon512, p256_falcon512, - "1.3.9999.3.12", 28), + "1.3.9999.3.12", 21), OQS_SIGALG_ENTRY(rsa3072_falcon512, rsa3072_falcon512, rsa3072_falcon512, - "1.3.9999.3.13", 29), + "1.3.9999.3.13", 22), # endif # ifdef OQS_ENABLE_SIG_falcon_padded_512 OQS_SIGALG_ENTRY(falconpadded512, falconpadded512, falconpadded512, - "1.3.9999.3.16", 30), + "1.3.9999.3.16", 23), OQS_SIGALG_ENTRY(p256_falconpadded512, p256_falconpadded512, - p256_falconpadded512, "1.3.9999.3.17", 31), + p256_falconpadded512, "1.3.9999.3.17", 24), OQS_SIGALG_ENTRY(rsa3072_falconpadded512, rsa3072_falconpadded512, - rsa3072_falconpadded512, "1.3.9999.3.18", 32), + rsa3072_falconpadded512, "1.3.9999.3.18", 25), # endif # ifdef OQS_ENABLE_SIG_falcon_1024 - OQS_SIGALG_ENTRY(falcon1024, falcon1024, falcon1024, "1.3.9999.3.14", 33), + OQS_SIGALG_ENTRY(falcon1024, falcon1024, falcon1024, "1.3.9999.3.14", 26), OQS_SIGALG_ENTRY(p521_falcon1024, p521_falcon1024, p521_falcon1024, - "1.3.9999.3.15", 34), + "1.3.9999.3.15", 27), # endif # ifdef OQS_ENABLE_SIG_falcon_padded_1024 OQS_SIGALG_ENTRY(falconpadded1024, falconpadded1024, falconpadded1024, - "1.3.9999.3.19", 35), + "1.3.9999.3.19", 28), OQS_SIGALG_ENTRY(p521_falconpadded1024, p521_falconpadded1024, - p521_falconpadded1024, "1.3.9999.3.20", 36), -# endif -# ifdef OQS_ENABLE_SIG_sphincs_sha2_128f_simple - OQS_SIGALG_ENTRY(sphincssha2128fsimple, sphincssha2128fsimple, - sphincssha2128fsimple, "1.3.9999.6.4.13", 37), - OQS_SIGALG_ENTRY(p256_sphincssha2128fsimple, p256_sphincssha2128fsimple, - p256_sphincssha2128fsimple, "1.3.9999.6.4.14", 38), - OQS_SIGALG_ENTRY(rsa3072_sphincssha2128fsimple, - rsa3072_sphincssha2128fsimple, - rsa3072_sphincssha2128fsimple, "1.3.9999.6.4.15", 39), -# endif -# ifdef OQS_ENABLE_SIG_sphincs_sha2_128s_simple - OQS_SIGALG_ENTRY(sphincssha2128ssimple, sphincssha2128ssimple, - sphincssha2128ssimple, "1.3.9999.6.4.16", 40), - OQS_SIGALG_ENTRY(p256_sphincssha2128ssimple, p256_sphincssha2128ssimple, - p256_sphincssha2128ssimple, "1.3.9999.6.4.17", 41), - OQS_SIGALG_ENTRY(rsa3072_sphincssha2128ssimple, - rsa3072_sphincssha2128ssimple, - rsa3072_sphincssha2128ssimple, "1.3.9999.6.4.18", 42), -# endif -# ifdef OQS_ENABLE_SIG_sphincs_sha2_192f_simple - OQS_SIGALG_ENTRY(sphincssha2192fsimple, sphincssha2192fsimple, - sphincssha2192fsimple, "1.3.9999.6.5.10", 43), - OQS_SIGALG_ENTRY(p384_sphincssha2192fsimple, p384_sphincssha2192fsimple, - p384_sphincssha2192fsimple, "1.3.9999.6.5.11", 44), -# endif -# ifdef OQS_ENABLE_SIG_sphincs_shake_128f_simple - OQS_SIGALG_ENTRY(sphincsshake128fsimple, sphincsshake128fsimple, - sphincsshake128fsimple, "1.3.9999.6.7.13", 45), - OQS_SIGALG_ENTRY(p256_sphincsshake128fsimple, p256_sphincsshake128fsimple, - p256_sphincsshake128fsimple, "1.3.9999.6.7.14", 46), - OQS_SIGALG_ENTRY(rsa3072_sphincsshake128fsimple, - rsa3072_sphincsshake128fsimple, - rsa3072_sphincsshake128fsimple, "1.3.9999.6.7.15", 47), + p521_falconpadded1024, "1.3.9999.3.20", 29), # endif ///// OQS_TEMPLATE_FRAGMENT_SIGALG_NAMES_END }; diff --git a/oqsprov/oqsprov_keys.c b/oqsprov/oqsprov_keys.c index f5de254c..e20d11a3 100644 --- a/oqsprov/oqsprov_keys.c +++ b/oqsprov/oqsprov_keys.c @@ -55,9 +55,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 101 +# define NID_TABLE_LEN 83 #else -# define NID_TABLE_LEN 48 +# define NID_TABLE_LEN 30 #endif static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { @@ -128,13 +128,6 @@ static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { {0, "p521_hqc256", OQS_KEM_alg_hqc_256, KEY_TYPE_ECP_HYB_KEM, 256}, #endif /* OQS_KEM_ENCODERS */ - {0, "dilithium2", OQS_SIG_alg_dilithium_2, KEY_TYPE_SIG, 128}, - {0, "p256_dilithium2", OQS_SIG_alg_dilithium_2, KEY_TYPE_HYB_SIG, 128}, - {0, "rsa3072_dilithium2", OQS_SIG_alg_dilithium_2, KEY_TYPE_HYB_SIG, 128}, - {0, "dilithium3", OQS_SIG_alg_dilithium_3, KEY_TYPE_SIG, 192}, - {0, "p384_dilithium3", OQS_SIG_alg_dilithium_3, KEY_TYPE_HYB_SIG, 192}, - {0, "dilithium5", OQS_SIG_alg_dilithium_5, KEY_TYPE_SIG, 256}, - {0, "p521_dilithium5", OQS_SIG_alg_dilithium_5, KEY_TYPE_HYB_SIG, 256}, {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}, @@ -168,28 +161,6 @@ static oqs_nid_name_t nid_names[NID_TABLE_LEN] = { {0, "falconpadded1024", OQS_SIG_alg_falcon_padded_1024, KEY_TYPE_SIG, 256}, {0, "p521_falconpadded1024", OQS_SIG_alg_falcon_padded_1024, KEY_TYPE_HYB_SIG, 256}, - {0, "sphincssha2128fsimple", OQS_SIG_alg_sphincs_sha2_128f_simple, - KEY_TYPE_SIG, 128}, - {0, "p256_sphincssha2128fsimple", OQS_SIG_alg_sphincs_sha2_128f_simple, - KEY_TYPE_HYB_SIG, 128}, - {0, "rsa3072_sphincssha2128fsimple", OQS_SIG_alg_sphincs_sha2_128f_simple, - KEY_TYPE_HYB_SIG, 128}, - {0, "sphincssha2128ssimple", OQS_SIG_alg_sphincs_sha2_128s_simple, - KEY_TYPE_SIG, 128}, - {0, "p256_sphincssha2128ssimple", OQS_SIG_alg_sphincs_sha2_128s_simple, - KEY_TYPE_HYB_SIG, 128}, - {0, "rsa3072_sphincssha2128ssimple", OQS_SIG_alg_sphincs_sha2_128s_simple, - KEY_TYPE_HYB_SIG, 128}, - {0, "sphincssha2192fsimple", OQS_SIG_alg_sphincs_sha2_192f_simple, - KEY_TYPE_SIG, 192}, - {0, "p384_sphincssha2192fsimple", OQS_SIG_alg_sphincs_sha2_192f_simple, - KEY_TYPE_HYB_SIG, 192}, - {0, "sphincsshake128fsimple", OQS_SIG_alg_sphincs_shake_128f_simple, - KEY_TYPE_SIG, 128}, - {0, "p256_sphincsshake128fsimple", OQS_SIG_alg_sphincs_shake_128f_simple, - KEY_TYPE_HYB_SIG, 128}, - {0, "rsa3072_sphincsshake128fsimple", OQS_SIG_alg_sphincs_shake_128f_simple, - KEY_TYPE_HYB_SIG, 128}, ///// OQS_TEMPLATE_FRAGMENT_OQSNAMES_END }; diff --git a/scripts/common.py b/scripts/common.py index 98716939..de7fa2f8 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -16,9 +16,9 @@ 'ecdsap256', 'rsa3072', ##### OQS_TEMPLATE_FRAGMENT_SIG_ALGS_START # post-quantum signatures - 'dilithium2','dilithium3','dilithium5','mldsa44','mldsa65','mldsa87','falcon512','falconpadded512','falcon1024','falconpadded1024','sphincssha2128fsimple','sphincssha2128ssimple','sphincssha2192fsimple','sphincsshake128fsimple', + 'mldsa44','mldsa65','mldsa87','falcon512','falconpadded512','falcon1024','falconpadded1024', # post-quantum + classical signatures - 'p256_dilithium2','rsa3072_dilithium2','p384_dilithium3','p521_dilithium5','p256_mldsa44','rsa3072_mldsa44','p384_mldsa65','p521_mldsa87','p256_falcon512','rsa3072_falcon512','p256_falconpadded512','rsa3072_falconpadded512','p521_falcon1024','p521_falconpadded1024','p256_sphincssha2128fsimple','rsa3072_sphincssha2128fsimple','p256_sphincssha2128ssimple','rsa3072_sphincssha2128ssimple','p384_sphincssha2192fsimple','p256_sphincsshake128fsimple','rsa3072_sphincsshake128fsimple', + 'p256_mldsa44','rsa3072_mldsa44','p384_mldsa65','p521_mldsa87','p256_falcon512','rsa3072_falcon512','p256_falconpadded512','rsa3072_falconpadded512','p521_falcon1024','p521_falconpadded1024', # post-quantum + classical signatures (COMPOSITE) 'mldsa44_pss2048','mldsa44_rsa2048','mldsa44_ed25519','mldsa44_p256','mldsa44_bp256','mldsa65_pss3072','mldsa65_rsa3072','mldsa65_p256','mldsa65_bp256','mldsa65_ed25519','mldsa87_p384','mldsa87_bp384','mldsa87_ed448', ##### OQS_TEMPLATE_FRAGMENT_SIG_ALGS_END diff --git a/test/oqs_test_evp_pkey_params.c b/test/oqs_test_evp_pkey_params.c index f3f2ed0f..7629fb79 100644 --- a/test/oqs_test_evp_pkey_params.c +++ b/test/oqs_test_evp_pkey_params.c @@ -19,10 +19,6 @@ /** \brief List of hybrid signature algorithms. */ const char *kHybridSignatureAlgorithms[] = { - "p256_dilithium2", - "rsa3072_dilithium2", - "p384_dilithium3", - "p521_dilithium5", "p256_mldsa44", "rsa3072_mldsa44", "p384_mldsa65", @@ -33,13 +29,6 @@ const char *kHybridSignatureAlgorithms[] = { "rsa3072_falconpadded512", "p521_falcon1024", "p521_falconpadded1024", - "p256_sphincssha2128fsimple", - "rsa3072_sphincssha2128fsimple", - "p256_sphincssha2128ssimple", - "rsa3072_sphincssha2128ssimple", - "p384_sphincssha2192fsimple", - "p256_sphincsshake128fsimple", - "rsa3072_sphincsshake128fsimple", NULL, }; ///// OQS_TEMPLATE_FRAGMENT_HYBRID_SIG_ALGS_END