Botan 3.6.0
Crypto and TLS for C&
Botan::Dilithium_Keypair_Codec Class Referenceabstract

#include <dilithium_keys.h>

Inheritance diagram for Botan::Dilithium_Keypair_Codec:
Botan::Dilithium_Expanded_Keypair_Codec Botan::ML_DSA_Expanding_Keypair_Codec

Public Member Functions

virtual DilithiumInternalKeypair decode_keypair (std::span< const uint8_t > private_key, DilithiumConstants mode) const =0
 
virtual secure_vector< uint8_t > encode_keypair (DilithiumInternalKeypair keypair) const =0
 
virtual ~Dilithium_Keypair_Codec ()=default
 

Static Public Member Functions

static std::unique_ptr< Dilithium_Keypair_Codeccreate (DilithiumMode mode)
 

Detailed Description

Definition at line 23 of file dilithium_keys.h.

Constructor & Destructor Documentation

◆ ~Dilithium_Keypair_Codec()

virtual Botan::Dilithium_Keypair_Codec::~Dilithium_Keypair_Codec ( )
virtualdefault

Member Function Documentation

◆ create()

std::unique_ptr< Dilithium_Keypair_Codec > Botan::Dilithium_Keypair_Codec::create ( DilithiumMode mode)
static

Definition at line 22 of file dilithium_keys.cpp.

22 {
23#if defined(BOTAN_HAS_DILITHIUM) || defined(BOTAN_HAS_DILITHIUM_AES)
24 if(mode.is_dilithium_round3()) {
25 return std::make_unique<Dilithium_Expanded_Keypair_Codec>();
26 }
27#endif
28
29#if defined(BOTAN_HAS_ML_DSA)
30 if(mode.is_ml_dsa()) {
31 return std::make_unique<ML_DSA_Expanding_Keypair_Codec>();
32 }
33#endif
34
35 throw Not_Implemented("requested ML-DSA/Dilithium mode is not implemented in this build");
36}

References Botan::DilithiumMode::is_dilithium_round3(), and Botan::DilithiumMode::is_ml_dsa().

Referenced by Botan::DilithiumConstants::DilithiumConstants().

◆ decode_keypair()

virtual DilithiumInternalKeypair Botan::Dilithium_Keypair_Codec::decode_keypair ( std::span< const uint8_t > private_key,
DilithiumConstants mode ) const
pure virtual

◆ encode_keypair()

virtual secure_vector< uint8_t > Botan::Dilithium_Keypair_Codec::encode_keypair ( DilithiumInternalKeypair keypair) const
pure virtual

The documentation for this class was generated from the following files: