#include <dilithium_aes.h>
Definition at line 23 of file dilithium_aes.h.
◆ XofType
◆ create()
Definition at line 22 of file dilithium_symmetric_primitives.cpp.
22 {
23#if BOTAN_HAS_DILITHIUM
24 if(mode.is_modern()) {
25 return std::make_unique<Dilithium_Common_Symmetric_Primitives>();
26 }
27#endif
28
29#if BOTAN_HAS_DILITHIUM_AES
30 if(mode.is_aes()) {
31 return std::make_unique<Dilithium_AES_Symmetric_Primitives>();
32 }
33#endif
34
35 throw Not_Implemented("requested Dilithium mode is not enabled in this build");
36}
References Botan::DilithiumMode::is_aes(), and Botan::DilithiumMode::is_modern().
◆ CRH()
secure_vector< uint8_t > Botan::Dilithium_Symmetric_Primitives::CRH |
( |
std::span< const uint8_t > | in, |
|
|
size_t | out_len ) const |
|
inlineinherited |
◆ ExpandMask()
secure_vector< uint8_t > Botan::Dilithium_Symmetric_Primitives::ExpandMask |
( |
std::span< const uint8_t > | seed, |
|
|
uint16_t | nonce, |
|
|
size_t | out_len ) const |
|
inlineinherited |
◆ H()
secure_vector< uint8_t > Botan::Dilithium_Symmetric_Primitives::H |
( |
std::span< const uint8_t > | seed, |
|
|
size_t | out_len ) const |
|
inlineinherited |
◆ XOF()
std::unique_ptr< Botan::XOF > Botan::Dilithium_AES_Symmetric_Primitives::XOF |
( |
XofType | , |
|
|
std::span< const uint8_t > | seed, |
|
|
uint16_t | nonce ) const |
|
inlinefinalvirtual |
Implements Botan::Dilithium_Symmetric_Primitives.
Definition at line 26 of file dilithium_aes.h.
26 {
27
28
29
30
31
32
33
35
36 const std::array<uint8_t, 12> iv{get_byte<1>(nonce), get_byte<0>(nonce), 0};
37 const auto key = seed.first(32);
38
39 auto xof = std::make_unique<AES_256_CTR_XOF>();
40 xof->start(iv, key);
41 return xof;
42 }
#define BOTAN_ASSERT_NOMSG(expr)
References BOTAN_ASSERT_NOMSG.
The documentation for this class was generated from the following file: