Botan 3.11.0
Crypto and TLS for C&
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
14namespace Botan {
15
16class DilithiumShakeXOF final : public DilithiumXOF {
17 public:
18 DilithiumShakeXOF() = default;
19
21
22 DilithiumShakeXOF(const DilithiumShakeXOF& other) = delete;
26
27 std::unique_ptr<XOF> XOF128(std::span<const uint8_t> seed, uint16_t nonce) const override {
28 return createXOF("SHAKE-128", seed, nonce);
29 }
30
31 std::unique_ptr<XOF> XOF256(std::span<const uint8_t> seed, uint16_t nonce) const override {
32 return createXOF("SHAKE-256", seed, nonce);
33 }
34
35 private:
36 static std::unique_ptr<Botan::XOF> createXOF(std::string_view name,
37 std::span<const uint8_t> seed,
38 uint16_t nonce);
39};
40
41} // namespace Botan
42
43#endif
DilithiumShakeXOF(DilithiumShakeXOF &&other)=delete
DilithiumShakeXOF(const DilithiumShakeXOF &other)=delete
std::unique_ptr< XOF > XOF128(std::span< const uint8_t > seed, uint16_t nonce) const override
std::unique_ptr< XOF > XOF256(std::span< const uint8_t > seed, uint16_t nonce) const override
DilithiumShakeXOF & operator=(DilithiumShakeXOF &&other)=delete
DilithiumShakeXOF & operator=(const DilithiumShakeXOF &other)=delete