Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3a026f3
add parsing of ECC group from ECC parameters
falko-strenzke Apr 15, 2026
c8be7ac
Update doc/api_ref/pubkey.rst
falko-strenzke Jun 22, 2026
1d4cca3
Update src/lib/pubkey/mldsa-composite/mldsa_comp_parameters.h
falko-strenzke Jun 22, 2026
5e2939f
remove unused vars
falko-strenzke Jun 22, 2026
2a44db3
fix header guard
falko-strenzke Jun 22, 2026
8c367c7
fix compilation error
falko-strenzke Jun 22, 2026
adcdad2
new mldsa-comp parameterization
falko-strenzke Jun 22, 2026
9ca6421
adapt doc to new parameter model
falko-strenzke Jun 23, 2026
a794bbb
change API algo name
falko-strenzke Jun 24, 2026
80637fa
fix some CI failures
falko-strenzke Jun 25, 2026
ce7dc67
adapt supported function from mlkem-composite branch
falko-strenzke Jun 25, 2026
dd0411e
fix minor findings from claude
falko-strenzke Jun 25, 2026
2c51a30
fix copy & paste errors
falko-strenzke Jul 6, 2026
1abbe96
fix signature size related test failure
falko-strenzke Jul 6, 2026
462c6f1
remove std::format
falko-strenzke Jul 6, 2026
9d137e0
fix unused exception varialble
falko-strenzke Jul 7, 2026
cf645c9
remove std::format
falko-strenzke Jul 7, 2026
e28bc77
fix empty std::array for MSVC
falko-strenzke Jul 7, 2026
6159ba2
fix code formatting
falko-strenzke Jul 7, 2026
3948dd2
fix clang-tidy issues
falko-strenzke Jul 7, 2026
08b92a5
fix conditional compilation
falko-strenzke Jul 7, 2026
211a58b
fix cond. compilation filesystem
falko-strenzke Jul 7, 2026
57b5a6d
add python tests
falko-strenzke Jul 10, 2026
d1dfdda
add example
falko-strenzke Jul 10, 2026
4868858
fix some of TJ-91's commments
falko-strenzke Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion doc/api_ref/pubkey.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,20 @@ Currently two flavors of Dilithium are implemented in separate Botan modules:
* ``dilithium_aes``, that uses AES instead of Keccak-based primitives.
This mode is deprecated and will be removed in a future release.

ML-DSA-composite (draft-ietf-lamps-pq-composite-sigs-19)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Composite signature algorithms combining ML-DSA with a traditional signature
algorithm. All variants defined in draft-ietf-lamps-pq-composite-sigs-19 are
supported. Each is modelled as a specific parameter value of the generic
algorithm ``MLDSA-Composite``. The module for the composite algorithms is given
by `mldsa-composite`, but note that naturally only those algorithm combinations
are available for which the respective module support is compiled.

One specific trait of these algorithms is that for the combinations with ECDSA,
due to variability in the encoded signature, the signature size returned by the
signature or verification operation instance is only an upper bound, and not the
exact size.

ML-KEM (FIPS 203)
~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -1039,7 +1053,18 @@ Botan implements the following signature algorithms:
- ``<user ID>,<HashFunction>``

#. ML-DSA (Dilithium).
Takes the optional parameter ``Deterministic`` (default) or ``Randomized``.
Takes and optional parameter string formed by comma-separated list of the following format ``[(Deterministic|Randomized),][Pure,][ctx_hex=<hex-value>]``, where the ordering of the comma-separated elements is arbitrary. The specification of ``Pure`` is redundant since currently only the pure variant of ML-DSA is implemented. The defaults of the other values are ``Randomized`` and an empty context parameter (`ctx_hex`). Non-empty context parameters are only supported by ML-DSA, but not by Dilithium. ``Deterministic`` or ``Randomized`` may also be specified in a verification operation thought it has no effect there.
#. ML-DSA-composite (draft-ietf-lamps-pq-composite-sigs-19).
The algorithm is identified by the generic algorithm name "ML-DSA-Composite".
It requires a parameter identifying the specific algorithm combination. The
following
parameter sets are principally available: MLDSA44-RSA2048-PKCS15-SHA256, MLDSA65-RSA3072-PKCS15-SHA512,
MLDSA65-RSA4096-PKCS15-SHA512, MLDSA44-RSA2048-PSS-SHA256, MLDSA65-RSA3072-PSS-SHA512,
MLDSA65-RSA4096-PSS-SHA512, MLDSA87-RSA3072-PSS-SHA512, MLDSA87-RSA4096-PSS-SHA512,
MLDSA44-ECDSA-P256-SHA256, MLDSA65-ECDSA-P256-SHA512, MLDSA65-ECDSA-P384-SHA512,
MLDSA65-ECDSA-brainpoolP256r1-SHA512, MLDSA87-ECDSA-P384-SHA512,
MLDSA87-ECDSA-brainpoolP384r1-SHA512, MLDSA87-ECDSA-P521-SHA512, MLDSA44-Ed25519-SHA512,
MLDSA65-Ed25519-SHA512, MLDSA87-Ed448-SHAKE256
#. SLH-DSA.
Takes the optional parameter ``Deterministic`` (default) or ``Randomized``.
#. XMSS. Takes no parameter.
Expand Down
2 changes: 1 addition & 1 deletion readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Public Key Cryptography
* RSA signatures and encryption
* DH, ECDH, X25519 and X448 key agreement
* Elliptic curve signature schemes ECDSA, Ed25519, Ed448, ECGDSA, ECKCDSA, SM2
* Post-quantum signature schemes ML-DSA (Dilithium), SLH-DSA (SPHINCS+), HSS/LMS, XMSS
* Post-quantum signature schemes ML-DSA (Dilithium), ML-DSA-composite, SLH-DSA (SPHINCS+), HSS/LMS, XMSS
* Post-quantum key encapsulation schemes ML-KEM (Kyber), FrodoKEM, Classic McEliece

Ciphers, hashes, MACs, and checksums
Expand Down
21 changes: 21 additions & 0 deletions src/build-data/oids.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,3 +493,24 @@
1.3.6.1.4.1.25258.4.1 = numsp256d1
1.3.6.1.4.1.25258.4.2 = numsp384d1
1.3.6.1.4.1.25258.4.3 = numsp512d1

# ML-DSA composite from draft-ietf-lamps-pq-composite-sigs
1.3.6.1.5.5.7.6.37 = MLDSA44-RSA2048-PSS-SHA256
1.3.6.1.5.5.7.6.38 = MLDSA44-RSA2048-PKCS15-SHA256
1.3.6.1.5.5.7.6.39 = MLDSA44-Ed25519-SHA512
1.3.6.1.5.5.7.6.40 = MLDSA44-ECDSA-P256-SHA256
1.3.6.1.5.5.7.6.41 = MLDSA65-RSA3072-PSS-SHA512
1.3.6.1.5.5.7.6.42 = MLDSA65-RSA3072-PKCS15-SHA512
1.3.6.1.5.5.7.6.43 = MLDSA65-RSA4096-PSS-SHA512
1.3.6.1.5.5.7.6.44 = MLDSA65-RSA4096-PKCS15-SHA512
1.3.6.1.5.5.7.6.45 = MLDSA65-ECDSA-P256-SHA512
1.3.6.1.5.5.7.6.46 = MLDSA65-ECDSA-P384-SHA512
1.3.6.1.5.5.7.6.47 = MLDSA65-ECDSA-brainpoolP256r1-SHA512
1.3.6.1.5.5.7.6.48 = MLDSA65-Ed25519-SHA512
1.3.6.1.5.5.7.6.49 = MLDSA87-ECDSA-P384-SHA512
1.3.6.1.5.5.7.6.50 = MLDSA87-ECDSA-brainpoolP384r1-SHA512
1.3.6.1.5.5.7.6.51 = MLDSA87-Ed448-SHAKE256
1.3.6.1.5.5.7.6.52 = MLDSA87-RSA3072-PSS-SHA512
1.3.6.1.5.5.7.6.53 = MLDSA87-RSA4096-PSS-SHA512
1.3.6.1.5.5.7.6.54 = MLDSA87-ECDSA-P521-SHA512

28 changes: 28 additions & 0 deletions src/cli/perf_pk_sig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
#include <botan/internal/fmt.h>
#endif

#if defined(BOTAN_HAS_MLDSA_COMPOSITE)
#include <botan/mldsa_comp.h>
#include <botan/mldsa_comp_parameters.h>
#endif

namespace Botan_CLI {

namespace {
Expand Down Expand Up @@ -403,6 +408,29 @@ BOTAN_REGISTER_PERF_TEST("ML-DSA", PerfTest_ML_DSA);

#endif

#if defined(BOTAN_HAS_MLDSA_COMPOSITE)

class PerfTest_MLDSA_Composite final : public PerfTest_PKSig {
public:
std::string algo() const override { return Botan::MLDSA_Composite_Param::generic_algo_name; }

std::string hash() const override { return ""; }

std::vector<std::string> keygen_params(const PerfConfig& /*config*/) const override {
const auto all_params = Botan::MLDSA_Composite_Param::all_supported_param_sets();
std::vector<std::string> result;
result.reserve(all_params.size());
for(const auto& param : all_params) {
result.push_back(param.id_str());
}
return result;
}
};

BOTAN_REGISTER_PERF_TEST("MLDSA-Composite", PerfTest_MLDSA_Composite);

#endif

} // namespace

} // namespace Botan_CLI
38 changes: 38 additions & 0 deletions src/examples/mldsa_composite.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#include <botan/auto_rng.h>
#include <botan/mldsa_comp.h>
#include <botan/pubkey.h>
#include <botan/secmem.h>

#include <iostream>
#include <vector>

int main() {
// Create a random number generator used for key generation.
Botan::AutoSeeded_RNG rng;

// create a new public/private key pair for the ML-DSA-44 / ECDSA-P256
// composite signature scheme.
const auto param =
Botan::MLDSA_Composite_Param::from_id_supported_or_throw(Botan::MLDSA_Composite_Param::MLDSA44_ECDSA_P256_SHA256);
const Botan::MLDSA_Composite_PrivateKey private_key(rng, param);
const auto public_key = private_key.public_key();

// create Public Key Signer using the private key.
Botan::PK_Signer signer(private_key, rng, "");

// create and sign a message using the Public Key Signer.
Botan::secure_vector<uint8_t> msg{0x01, 0x02, 0x03, 0x04};
auto sig = signer.sign_message(msg, rng);

// create Public Key Verifier using the public key
Botan::PK_Verifier verifier(*public_key, "");

// verify the signature for the previously generated message.
if(verifier.verify_message(msg, sig)) {
std::cout << "Success.\n";
return 0;
} else {
std::cout << "Error.\n";
return 1;
}
}
74 changes: 73 additions & 1 deletion src/lib/asn1/static_oids.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* This file was automatically generated by ./src/scripts/dev_tools/gen_oids.py on 2026-05-13
* This file was automatically generated by ./src/scripts/dev_tools/gen_oids.py on 2026-05-28
* All manual changes will be lost. Edit the script instead.
*
* Botan is released under the Simplified BSD License (see license.txt)
Expand Down Expand Up @@ -583,6 +583,42 @@ std::optional<std::string_view> OID_Map::lookup_static_oid(const OID& oid) {
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 8}, "PKIX.TimeStamping");
case 0x94929:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 3, 9}, "PKIX.OCSPSigning");
case 0x94B88:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 37}, "MLDSA44-RSA2048-PSS-SHA256");
case 0x94B89:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 38}, "MLDSA44-RSA2048-PKCS15-SHA256");
case 0x94B8A:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 39}, "MLDSA44-Ed25519-SHA512");
case 0x94B8B:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 40}, "MLDSA44-ECDSA-P256-SHA256");
case 0x94B8C:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 41}, "MLDSA65-RSA3072-PSS-SHA512");
case 0x94B8D:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 42}, "MLDSA65-RSA3072-PKCS15-SHA512");
case 0x94B8E:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 43}, "MLDSA65-RSA4096-PSS-SHA512");
case 0x94B8F:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 44}, "MLDSA65-RSA4096-PKCS15-SHA512");
case 0x94B90:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 45}, "MLDSA65-ECDSA-P256-SHA512");
case 0x94B91:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 46}, "MLDSA65-ECDSA-P384-SHA512");
case 0x94B92:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 47}, "MLDSA65-ECDSA-brainpoolP256r1-SHA512");
case 0x94B93:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 48}, "MLDSA65-Ed25519-SHA512");
case 0x94B94:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 49}, "MLDSA87-ECDSA-P384-SHA512");
case 0x94B95:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 50}, "MLDSA87-ECDSA-brainpoolP384r1-SHA512");
case 0x94B96:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 51}, "MLDSA87-Ed448-SHAKE256");
case 0x94B97:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 52}, "MLDSA87-RSA3072-PSS-SHA512");
case 0x94B98:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 53}, "MLDSA87-RSA4096-PSS-SHA512");
case 0x94B99:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 6, 54}, "MLDSA87-ECDSA-P521-SHA512");
case 0x94CEA:
return if_match(oid, {1, 3, 6, 1, 5, 5, 7, 8, 5}, "PKIX.XMPPAddr");
case 0x94CEE:
Expand Down Expand Up @@ -747,6 +783,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "Twofish/GCM", {1, 3, 6, 1, 4, 1, 25258, 3, 102});
case 0x00CF3:
return if_match(req, "SphincsPlus-sha2-192f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 2, 4});
case 0x00F60:
return if_match(req, "MLDSA44-RSA2048-PKCS15-SHA256", {1, 3, 6, 1, 5, 5, 7, 6, 38});
case 0x015FE:
return if_match(req, "FrodoKEM-640-SHAKE", {1, 3, 6, 1, 4, 1, 25258, 1, 14, 1});
case 0x01F9E:
Expand Down Expand Up @@ -893,6 +931,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "secp384r1", {1, 3, 132, 0, 34});
case 0x32899:
return if_match(req, "TripleDES/CBC", {1, 2, 840, 113549, 3, 7});
case 0x330E9:
return if_match(req, "MLDSA65-ECDSA-brainpoolP256r1-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 47});
case 0x33C9C:
return if_match(req, "PKIX.SmtpUTF8Mailbox", {1, 3, 6, 1, 5, 5, 7, 8, 9});
case 0x33D04:
Expand All @@ -905,10 +945,14 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "SHAKE-128", {2, 16, 840, 1, 101, 3, 4, 2, 11});
case 0x36693:
return if_match(req, "ClassicMcEliece_348864", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 1});
case 0x37294:
return if_match(req, "MLDSA65-ECDSA-P256-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 45});
case 0x373C7:
return if_match(req, "ML-DSA-4x4", {2, 16, 840, 1, 101, 3, 4, 3, 17});
case 0x3750B:
return if_match(req, "ClassicMcEliece_8192128", {1, 3, 6, 1, 4, 1, 22554, 5, 1, 9});
case 0x38CEB:
return if_match(req, "MLDSA65-RSA4096-PKCS15-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 44});
case 0x39890:
return if_match(req, "Ed448", {1, 3, 101, 113});
case 0x3A438:
Expand Down Expand Up @@ -965,6 +1009,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "SHAKE-256", {2, 16, 840, 1, 101, 3, 4, 2, 12});
case 0x4663C:
return if_match(req, "X509v3.PolicyConstraints", {2, 5, 29, 36});
case 0x4793E:
return if_match(req, "MLDSA65-Ed25519-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 48});
case 0x480F7:
return if_match(req, "Serpent/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 4});
case 0x48627:
Expand All @@ -981,6 +1027,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "eFrodoKEM-976-AES", {1, 3, 6, 1, 4, 1, 25258, 1, 17, 2});
case 0x4C513:
return if_match(req, "DSA/SHA-224", {2, 16, 840, 1, 101, 3, 4, 3, 1});
case 0x4C6A2:
return if_match(req, "MLDSA44-Ed25519-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 39});
case 0x4C806:
return if_match(req, "DSA/SHA-256", {2, 16, 840, 1, 101, 3, 4, 3, 2});
case 0x4D740:
Expand All @@ -989,6 +1037,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "RSA/PKCS1v15(SHA-512)", {1, 2, 840, 113549, 1, 1, 13});
case 0x4ED5D:
return if_match(req, "CAST-128/CBC", {1, 2, 840, 113533, 7, 66, 10});
case 0x4F7FD:
return if_match(req, "MLDSA87-Ed448-SHAKE256", {1, 3, 6, 1, 5, 5, 7, 6, 51});
case 0x4FCDC:
return if_match(req, "RSA", {1, 2, 840, 113549, 1, 1, 1});
case 0x501CB:
Expand Down Expand Up @@ -1027,6 +1077,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "brainpool320r1", {1, 3, 36, 3, 3, 2, 8, 1, 1, 9});
case 0x56D0D:
return if_match(req, "SphincsPlus-shake-128f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 1, 2});
case 0x56E32:
return if_match(req, "MLDSA65-RSA4096-PSS-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 43});
case 0x57077:
return if_match(req, "XMSS-draft6", {1, 3, 6, 1, 4, 1, 25258, 1, 5});
case 0x5818B:
Expand Down Expand Up @@ -1083,6 +1135,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "AES-192/CBC", {2, 16, 840, 1, 101, 3, 4, 1, 22});
case 0x61F7E:
return if_match(req, "AES-192/CCM", {2, 16, 840, 1, 101, 3, 4, 1, 27});
case 0x6334D:
return if_match(req, "MLDSA65-ECDSA-P384-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 46});
case 0x64947:
return if_match(req, "OpenPGP.Ed25519", {1, 3, 6, 1, 4, 1, 11591, 15, 1});
case 0x652E7:
Expand Down Expand Up @@ -1121,6 +1175,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "PKCS12.SafeContentsBag", {1, 2, 840, 113549, 1, 12, 10, 1, 6});
case 0x6FB26:
return if_match(req, "PKIX.AuthorityInformationAccess", {1, 3, 6, 1, 5, 5, 7, 1, 1});
case 0x6FDF8:
return if_match(req, "MLDSA87-ECDSA-P384-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 49});
case 0x70BB6:
return if_match(req, "brainpool384r1", {1, 3, 36, 3, 3, 2, 8, 1, 1, 11});
case 0x70EA6:
Expand All @@ -1129,6 +1185,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "SphincsPlus-haraka-128f-r3.1", {1, 3, 6, 1, 4, 1, 25258, 1, 12, 3, 2});
case 0x7382C:
return if_match(req, "ML-KEM-1024", {2, 16, 840, 1, 101, 3, 4, 4, 3});
case 0x7406D:
return if_match(req, "MLDSA44-ECDSA-P256-SHA256", {1, 3, 6, 1, 5, 5, 7, 6, 40});
case 0x743BD:
return if_match(req, "AES-256/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 3});
case 0x7498E:
Expand Down Expand Up @@ -1209,6 +1267,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "ClassicMcEliece_6960119pcf", {1, 3, 6, 1, 4, 1, 25258, 1, 18, 4});
case 0x84CA4:
return if_match(req, "secp256k1", {1, 3, 132, 0, 10});
case 0x85097:
return if_match(req, "MLDSA87-ECDSA-P521-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 54});
case 0x85381:
return if_match(req, "secp256r1", {1, 2, 840, 10045, 3, 1, 7});
case 0x854FC:
Expand All @@ -1217,6 +1277,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "Serpent/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 4});
case 0x862D9:
return if_match(req, "ECGDSA/SHA-512", {1, 3, 36, 3, 3, 2, 5, 4, 6});
case 0x86448:
return if_match(req, "MLDSA44-RSA2048-PSS-SHA256", {1, 3, 6, 1, 5, 5, 7, 6, 37});
case 0x87585:
return if_match(req, "Twofish/CBC", {1, 3, 6, 1, 4, 1, 25258, 3, 3});
case 0x877D1:
Expand All @@ -1231,6 +1293,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "PBE-PKCS5v20", {1, 2, 840, 113549, 1, 5, 13});
case 0x8976D:
return if_match(req, "PKCS9.MessageDigest", {1, 2, 840, 113549, 1, 9, 4});
case 0x8AA2B:
return if_match(req, "MLDSA87-RSA3072-PSS-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 52});
case 0x8B002:
return if_match(req, "Camellia-256/OCB", {1, 3, 6, 1, 4, 1, 25258, 3, 2, 8});
case 0x8B935:
Expand Down Expand Up @@ -1345,6 +1409,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "Camellia-192/SIV", {1, 3, 6, 1, 4, 1, 25258, 3, 4, 7});
case 0xAAE2B:
return if_match(req, "Dilithium-8x7-AES-r3", {1, 3, 6, 1, 4, 1, 25258, 1, 10, 3});
case 0xAB866:
return if_match(req, "MLDSA65-RSA3072-PKCS15-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 42});
case 0xABCED:
return if_match(req, "GOST.IssuerSigningTool", {1, 2, 643, 100, 112});
case 0xABD24:
Expand All @@ -1371,6 +1437,8 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "X520.Locality", {2, 5, 4, 7});
case 0xB2FBD:
return if_match(req, "ECKCDSA/SHA-224", {1, 2, 410, 200004, 1, 100, 4, 4});
case 0xB31C6:
return if_match(req, "MLDSA65-RSA3072-PSS-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 41});
case 0xB32B0:
return if_match(req, "ECKCDSA/SHA-256", {1, 2, 410, 200004, 1, 100, 4, 5});
case 0xB360E:
Expand Down Expand Up @@ -1425,6 +1493,10 @@ std::optional<OID> OID_Map::lookup_static_oid_name(std::string_view req) {
return if_match(req, "SHA-1", {1, 3, 14, 3, 2, 26});
case 0xC28D1:
return if_match(req, "PKIX.OCSPSigning", {1, 3, 6, 1, 5, 5, 7, 3, 9});
case 0xC2EB3:
return if_match(req, "MLDSA87-RSA4096-PSS-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 53});
case 0xC38CA:
return if_match(req, "MLDSA87-ECDSA-brainpoolP384r1-SHA512", {1, 3, 6, 1, 5, 5, 7, 6, 50});
case 0xC42CA:
return if_match(req, "brainpool256r1", {1, 3, 36, 3, 3, 2, 8, 1, 1, 7});
default:
Expand Down
16 changes: 16 additions & 0 deletions src/lib/ffi/ffi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2053,6 +2053,22 @@ int botan_privkey_load_ml_dsa(botan_privkey_t* key, const uint8_t privkey[], siz
BOTAN_FFI_EXPORT(3, 6)
int botan_pubkey_load_ml_dsa(botan_pubkey_t* key, const uint8_t pubkey[], size_t key_len, const char* mldsa_mode);

/*
* Algorithm specific key operations: MLDSA-Composite
*/

BOTAN_FFI_EXPORT(3, 12)
int botan_privkey_load_mldsa_composite(botan_privkey_t* key,
const uint8_t privkey[],
size_t key_len,
const char* mldsa_composite_algo);

BOTAN_FFI_EXPORT(3, 12)
int botan_pubkey_load_mldsa_composite(botan_pubkey_t* key,
const uint8_t pubkey[],
size_t key_len,
const char* mldsa_composite_algo);

/*
* Algorithm specific key operations: Kyber R3
*
Expand Down
Loading
Loading