Botan
3.8.1
Crypto and TLS for C&
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
c
d
f
i
m
n
r
s
t
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
f
h
i
m
n
o
p
r
s
t
u
v
w
Enumerations
b
c
d
e
k
m
n
o
p
s
t
x
Enumerator
_
a
b
c
d
e
f
g
h
k
l
m
n
p
q
r
s
t
u
v
w
x
Related Symbols
b
c
d
e
f
k
o
p
s
t
x
Files
File List
File Members
All
_
a
b
c
d
e
f
k
m
n
p
t
w
Functions
b
c
Typedefs
b
c
e
p
t
Enumerations
Enumerator
b
c
d
e
k
n
Macros
_
a
b
c
f
m
n
t
w
src
lib
pubkey
dilithium
dilithium_common
dilithium_shake
dilithium_shake_xof.h
Go to the documentation of this file.
1
/*
2
* Asymmetric primitives for dilithium and ML-KEM using SHAKE as XOF
3
* (C) 2022 Jack Lloyd
4
* (C) 2022 Manuel Glaser, Michael Boric, René Meusel - Rohde & Schwarz Cybersecurity
5
*
6
* Botan is released under the Simplified BSD License (see license.txt)
7
*/
8
9
#ifndef BOTAN_DILITHIUM_SHAKE_XOF_ADAPTER_H_
10
#define BOTAN_DILITHIUM_SHAKE_XOF_ADAPTER_H_
11
12
#include <botan/internal/dilithium_symmetric_primitives.h>
13
14
#include <botan/internal/loadstor.h>
15
#include <botan/internal/shake_xof.h>
16
17
namespace
Botan
{
18
19
class
DilithiumShakeXOF
final :
public
DilithiumXOF
{
20
public
:
21
Botan::XOF
&
XOF128
(std::span<const uint8_t> seed, uint16_t nonce)
const override
{
22
return
XOF(m_xof_128, seed, nonce);
23
}
21
Botan::XOF
&
XOF128
(std::span<const uint8_t> seed, uint16_t nonce)
const override
{
…
}
24
25
Botan::XOF
&
XOF256
(std::span<const uint8_t> seed, uint16_t nonce)
const override
{
26
return
XOF(m_xof_256, seed, nonce);
27
}
25
Botan::XOF
&
XOF256
(std::span<const uint8_t> seed, uint16_t nonce)
const override
{
…
}
28
29
private
:
30
static
Botan::XOF
&
XOF
(
Botan::XOF
& xof, std::span<const uint8_t> seed, uint16_t nonce) {
31
xof.
clear
();
32
xof.
update
(seed);
33
xof.
update
(
store_le
(nonce));
34
return
xof;
35
}
36
37
private
:
38
mutable
SHAKE_256_XOF m_xof_256;
39
mutable
SHAKE_128_XOF m_xof_128;
40
};
19
class
DilithiumShakeXOF
final :
public
DilithiumXOF
{
…
};
41
42
}
// namespace Botan
43
44
#endif
Botan::DilithiumShakeXOF
Definition
dilithium_shake_xof.h:19
Botan::DilithiumShakeXOF::XOF128
Botan::XOF & XOF128(std::span< const uint8_t > seed, uint16_t nonce) const override
Definition
dilithium_shake_xof.h:21
Botan::DilithiumShakeXOF::XOF256
Botan::XOF & XOF256(std::span< const uint8_t > seed, uint16_t nonce) const override
Definition
dilithium_shake_xof.h:25
Botan::DilithiumXOF
Definition
dilithium_symmetric_primitives.h:89
Botan::XOF
Definition
xof.h:29
Botan::XOF::clear
void clear()
Definition
xof.h:66
Botan::XOF::update
void update(std::span< const uint8_t > input)
Definition
xof.h:142
Botan
Definition
alg_id.cpp:13
Botan::store_le
constexpr auto store_le(ParamTs &&... params)
Definition
loadstor.h:736
Generated by
1.13.2