Botan 3.9.0
Crypto and TLS for C&
kuznyechik.h
Go to the documentation of this file.
1/*
2* Kuznyechik
3* (C) 2023 Richard Huveneers
4* 2025 Jack Lloyd
5*
6* Botan is released under the Simplified BSD License (see license.txt)
7*/
8
9#ifndef BOTAN_KUZNYECHIK_H_
10#define BOTAN_KUZNYECHIK_H_
11
12#include <botan/block_cipher.h>
13#include <botan/secmem.h>
14
15namespace Botan {
16
17/**
18* Kuznyechik
19*/
20class Kuznyechik final : public Botan::Block_Cipher_Fixed_Params<16, 32> {
21 public:
22 void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
23 void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override;
24
25 void clear() override;
26
27 std::string name() const override { return "Kuznyechik"; }
28
29 std::unique_ptr<BlockCipher> new_object() const override { return std::make_unique<Kuznyechik>(); }
30
31 bool has_keying_material() const override;
32
33 private:
34 void key_schedule(std::span<const uint8_t> key) override;
37};
38
39} // namespace Botan
40
41#endif
std::unique_ptr< BlockCipher > new_object() const override
Definition kuznyechik.h:29
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
std::string name() const override
Definition kuznyechik.h:27
void clear() override
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
bool has_keying_material() const override
std::vector< T, secure_allocator< T > > secure_vector
Definition secmem.h:69