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

#include <dilithium_keys.h>

Public Member Functions

void _const_time_poison () const
 
void _const_time_unpoison () const
 
 Dilithium_PrivateKeyInternal (DilithiumConstants mode, std::optional< DilithiumSeedRandomness > seed, DilithiumSigningSeedK signing_seed, DilithiumPolyVec s1, DilithiumPolyVec s2, DilithiumPolyVec t0)
 
const DilithiumConstantsmode () const
 
const DilithiumPolyVecs1 () const
 
const DilithiumPolyVecs2 () const
 
const std::optional< DilithiumSeedRandomness > & seed () const
 
const DilithiumSigningSeedKsigning_seed () const
 
const DilithiumPolyVect0 () const
 

Detailed Description

Definition at line 68 of file dilithium_keys.h.

Constructor & Destructor Documentation

◆ Dilithium_PrivateKeyInternal()

Botan::Dilithium_PrivateKeyInternal::Dilithium_PrivateKeyInternal ( DilithiumConstants mode,
std::optional< DilithiumSeedRandomness > seed,
DilithiumSigningSeedK signing_seed,
DilithiumPolyVec s1,
DilithiumPolyVec s2,
DilithiumPolyVec t0 )
inline

Definition at line 70 of file dilithium_keys.h.

75 :
76 m_mode(std::move(mode)),
77 m_seed(std::move(seed)),
78 m_signing_seed(std::move(signing_seed)),
79 m_t0(std::move(t0)),
80 m_s1(std::move(s1)),
81 m_s2(std::move(s2)) {}
const std::optional< DilithiumSeedRandomness > & seed() const
const DilithiumPolyVec & s1() const
const DilithiumPolyVec & s2() const
const DilithiumConstants & mode() const
const DilithiumPolyVec & t0() const
const DilithiumSigningSeedK & signing_seed() const

Member Function Documentation

◆ _const_time_poison()

void Botan::Dilithium_PrivateKeyInternal::_const_time_poison ( ) const
inline

Definition at line 96 of file dilithium_keys.h.

96 {
97 // Note: m_rho and m_tr is public knowledge
98 CT::poison_all(m_signing_seed, m_s1, m_s2, m_t0);
99 if(m_seed.has_value()) {
100 CT::poison(m_seed.value());
101 }
102 }
constexpr void poison_all(Ts &&... ts)
Definition ct_utils.h:195
constexpr void poison(const T *p, size_t n)
Definition ct_utils.h:53

References Botan::CT::poison(), and Botan::CT::poison_all().

◆ _const_time_unpoison()

void Botan::Dilithium_PrivateKeyInternal::_const_time_unpoison ( ) const
inline

Definition at line 104 of file dilithium_keys.h.

104 {
105 CT::unpoison_all(m_signing_seed, m_s1, m_s2, m_t0);
106 if(m_seed.has_value()) {
107 CT::unpoison(m_seed.value());
108 }
109 }
constexpr void unpoison_all(Ts &&... ts)
Definition ct_utils.h:201
constexpr void unpoison(const T *p, size_t n)
Definition ct_utils.h:64

References Botan::CT::unpoison(), and Botan::CT::unpoison_all().

◆ mode()

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

Definition at line 84 of file dilithium_keys.h.

84{ return m_mode; }

◆ s1()

const DilithiumPolyVec & Botan::Dilithium_PrivateKeyInternal::s1 ( ) const
inline

Definition at line 90 of file dilithium_keys.h.

90{ return m_s1; }

◆ s2()

const DilithiumPolyVec & Botan::Dilithium_PrivateKeyInternal::s2 ( ) const
inline

Definition at line 92 of file dilithium_keys.h.

92{ return m_s2; }

◆ seed()

const std::optional< DilithiumSeedRandomness > & Botan::Dilithium_PrivateKeyInternal::seed ( ) const
inline

Definition at line 86 of file dilithium_keys.h.

86{ return m_seed; }

◆ signing_seed()

const DilithiumSigningSeedK & Botan::Dilithium_PrivateKeyInternal::signing_seed ( ) const
inline

Definition at line 88 of file dilithium_keys.h.

88{ return m_signing_seed; }

◆ t0()

const DilithiumPolyVec & Botan::Dilithium_PrivateKeyInternal::t0 ( ) const
inline

Definition at line 94 of file dilithium_keys.h.

94{ return m_t0; }

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