Botan 3.6.1
Crypto and TLS for C&
Botan::Dilithium_PublicKeyInternal Class Reference

#include <dilithium_keys.h>

Public Member Functions

 Dilithium_PublicKeyInternal (DilithiumConstants mode, DilithiumSeedRho rho, DilithiumPolyVec t1)
 
const DilithiumConstantsmode () const
 
DilithiumSerializedPublicKey raw_pk () const
 
const DilithiumSeedRhorho () const
 
const DilithiumPolyVect1 () const
 
const DilithiumHashedPublicKeytr () const
 

Static Public Member Functions

static std::shared_ptr< Dilithium_PublicKeyInternaldecode (DilithiumConstants mode, StrongSpan< const DilithiumSerializedPublicKey > raw_pk)
 

Detailed Description

Definition at line 33 of file dilithium_keys.h.

Constructor & Destructor Documentation

◆ Dilithium_PublicKeyInternal()

Botan::Dilithium_PublicKeyInternal::Dilithium_PublicKeyInternal ( DilithiumConstants mode,
DilithiumSeedRho rho,
DilithiumPolyVec t1 )
inline

Definition at line 41 of file dilithium_keys.h.

41 :
42 m_mode(std::move(mode)),
43 m_rho(std::move(rho)),
44 m_t1(std::move(t1)),
45 m_tr(m_mode.symmetric_primitives().H(raw_pk())) {
46 BOTAN_ASSERT_NOMSG(!m_rho.empty());
47 BOTAN_ASSERT_NOMSG(m_t1.size() > 0);
48 }
#define BOTAN_ASSERT_NOMSG(expr)
Definition assert.h:59
Dilithium_Symmetric_Primitives_Base & symmetric_primitives() const
const DilithiumSeedRho & rho() const
const DilithiumPolyVec & t1() const
const DilithiumConstants & mode() const
DilithiumSerializedPublicKey raw_pk() const
DilithiumHashedPublicKey H(StrongSpan< const DilithiumSerializedPublicKey > pk) const

References BOTAN_ASSERT_NOMSG, and Botan::CRYSTALS::PolynomialVector< Trait, D >::size().

Member Function Documentation

◆ decode()

static std::shared_ptr< Dilithium_PublicKeyInternal > Botan::Dilithium_PublicKeyInternal::decode ( DilithiumConstants mode,
StrongSpan< const DilithiumSerializedPublicKey > raw_pk )
inlinestatic

Definition at line 35 of file dilithium_keys.h.

36 {
38 return std::make_shared<Dilithium_PublicKeyInternal>(std::move(mode), std::move(rho), std::move(t1));
39 }
std::pair< DilithiumSeedRho, DilithiumPolyVec > decode_public_key(StrongSpan< const DilithiumSerializedPublicKey > pk, const DilithiumConstants &mode)

References Botan::Dilithium_Algos::decode_public_key(), mode(), raw_pk(), rho(), and t1().

Referenced by Botan::Dilithium_PublicKey::Dilithium_PublicKey().

◆ mode()

const DilithiumConstants & Botan::Dilithium_PublicKeyInternal::mode ( ) const
inline

Definition at line 59 of file dilithium_keys.h.

59{ return m_mode; }

Referenced by decode().

◆ raw_pk()

DilithiumSerializedPublicKey Botan::Dilithium_PublicKeyInternal::raw_pk ( ) const
inline

Definition at line 51 of file dilithium_keys.h.

51{ return Dilithium_Algos::encode_public_key(m_rho, m_t1, m_mode); }
DilithiumSerializedPublicKey encode_public_key(StrongSpan< const DilithiumSeedRho > rho, const DilithiumPolyVec &t1, const DilithiumConstants &mode)

References Botan::Dilithium_Algos::encode_public_key().

Referenced by decode().

◆ rho()

const DilithiumSeedRho & Botan::Dilithium_PublicKeyInternal::rho ( ) const
inline

Definition at line 57 of file dilithium_keys.h.

57{ return m_rho; }

Referenced by decode().

◆ t1()

const DilithiumPolyVec & Botan::Dilithium_PublicKeyInternal::t1 ( ) const
inline

Definition at line 55 of file dilithium_keys.h.

55{ return m_t1; }

Referenced by decode().

◆ tr()

const DilithiumHashedPublicKey & Botan::Dilithium_PublicKeyInternal::tr ( ) const
inline

Definition at line 53 of file dilithium_keys.h.

53{ return m_tr; }

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