Botan 3.7.1
Crypto and TLS for C&
|
#include <gost_28147.h>
Public Types | |
enum | |
Public Member Functions | |
size_t | block_size () const final |
void | clear () override |
BlockCipher * | clone () const |
void | decrypt (const uint8_t in[], uint8_t out[]) const |
void | decrypt (std::span< const uint8_t > in, std::span< uint8_t > out) const |
void | decrypt (std::span< uint8_t > block) const |
void | decrypt (uint8_t block[]) const |
void | decrypt_n (const uint8_t in[], uint8_t out[], size_t blocks) const override |
virtual void | decrypt_n_xex (uint8_t data[], const uint8_t mask[], size_t blocks) const |
void | encrypt (const uint8_t in[], uint8_t out[]) const |
void | encrypt (std::span< const uint8_t > in, std::span< uint8_t > out) const |
void | encrypt (std::span< uint8_t > block) const |
void | encrypt (uint8_t block[]) const |
void | encrypt_n (const uint8_t in[], uint8_t out[], size_t blocks) const override |
virtual void | encrypt_n_xex (uint8_t data[], const uint8_t mask[], size_t blocks) const |
GOST_28147_89 (const GOST_28147_89_Params ¶ms) | |
GOST_28147_89 (const std::vector< uint32_t > &other_SBOX, std::string_view name) | |
GOST_28147_89 (std::string_view param_name) | |
bool | has_keying_material () const override |
Key_Length_Specification | key_spec () const final |
size_t | maximum_keylength () const |
size_t | minimum_keylength () const |
std::string | name () const override |
std::unique_ptr< BlockCipher > | new_object () const override |
size_t | parallel_bytes () const |
virtual size_t | parallelism () const |
virtual std::string | provider () const |
void | set_key (const SymmetricKey &key) |
void | set_key (const uint8_t key[], size_t length) |
void | set_key (std::span< const uint8_t > key) |
bool | valid_keylength (size_t length) const |
Static Public Member Functions | |
static std::unique_ptr< BlockCipher > | create (std::string_view algo_spec, std::string_view provider="") |
static std::unique_ptr< BlockCipher > | create_or_throw (std::string_view algo_spec, std::string_view provider="") |
static std::vector< std::string > | providers (std::string_view algo_spec) |
Protected Member Functions | |
void | assert_key_material_set () const |
void | assert_key_material_set (bool predicate) const |
GOST 28147-89
Definition at line 58 of file gost_28147.h.
|
inherited |
Definition at line 197 of file block_cipher.h.
|
explicit |
params | the sbox parameters to use |
Definition at line 57 of file gost_28147.cpp.
References Botan::fmt(), Botan::rotl(), and Botan::GOST_28147_89_Params::sbox_pair().
Referenced by GOST_28147_89().
|
inlineexplicit |
Definition at line 78 of file gost_28147.h.
References GOST_28147_89().
|
inlineexplicit |
Definition at line 80 of file gost_28147.h.
References name().
|
inlineprotectedinherited |
Definition at line 139 of file sym_algo.h.
Referenced by Botan::GOST_28147_89::decrypt_n(), and Botan::GOST_28147_89::encrypt_n().
|
inlineprotectedinherited |
Definition at line 141 of file sym_algo.h.
|
inlinefinalvirtualinherited |
Implements Botan::BlockCipher.
Definition at line 199 of file block_cipher.h.
|
overridevirtual |
Reset the internal state. This includes not just the key, but any partial message that may have been in process.
Implements Botan::SymmetricAlgorithm.
Definition at line 160 of file gost_28147.cpp.
References Botan::zap().
|
inlineinherited |
Definition at line 171 of file block_cipher.h.
|
staticinherited |
Create an instance based on a name If provider is empty then best available is chosen.
algo_spec | algorithm name |
provider | provider implementation to choose |
Definition at line 32 of file block_cipher.cpp.
|
staticinherited |
Create an instance based on a name, or throw if the algo/provider combination cannot be found. If provider is empty then best available is chosen.
Definition at line 39 of file block_cipher.cpp.
|
inlineinherited |
Decrypt a block.
in | The ciphertext block to be decypted as a byte array. Must be of length block_size(). |
out | The byte array designated to hold the decrypted block. Must be of length block_size(). |
Definition at line 84 of file block_cipher.h.
|
inlineinherited |
Decrypt one or more blocks
in | the input buffer (multiple of block_size()) |
out | the output buffer (same size as in) |
Definition at line 132 of file block_cipher.h.
|
inlineinherited |
Decrypt one or more blocks
block | the input/output buffer (multiple of block_size()) |
Definition at line 114 of file block_cipher.h.
|
inlineinherited |
Decrypt a block.
block | the ciphertext block to be decrypted Must be of length block_size(). Will hold the result when the function has finished. |
Definition at line 100 of file block_cipher.h.
|
overridevirtual |
Decrypt one or more blocks
in | the input buffer (multiple of block_size()) |
out | the output buffer (same size as in) |
blocks | the number of blocks to process |
Implements Botan::BlockCipher.
Definition at line 121 of file gost_28147.cpp.
References Botan::Block_Cipher_Fixed_Params< 8, 32 >::assert_key_material_set(), Botan::Block_Cipher_Fixed_Params< 8, 32 >::BLOCK_SIZE, Botan::load_le(), and Botan::store_le().
|
inlinevirtualinherited |
Definition at line 159 of file block_cipher.h.
|
inlineinherited |
Encrypt a block.
in | The plaintext block to be encrypted as a byte array. Must be of length block_size(). |
out | The byte array designated to hold the encrypted block. Must be of length block_size(). |
Definition at line 75 of file block_cipher.h.
|
inlineinherited |
Encrypt one or more blocks
in | the input buffer (multiple of block_size()) |
out | the output buffer (same size as in) |
Definition at line 123 of file block_cipher.h.
|
inlineinherited |
Encrypt one or more blocks
block | the input/output buffer (multiple of block_size()) |
Definition at line 106 of file block_cipher.h.
|
inlineinherited |
Encrypt a block.
block | the plaintext block to be encrypted Must be of length block_size(). Will hold the result when the function has finished. |
Definition at line 92 of file block_cipher.h.
|
overridevirtual |
Encrypt one or more blocks
in | the input buffer (multiple of block_size()) |
out | the output buffer (same size as in) |
blocks | the number of blocks to process |
Implements Botan::BlockCipher.
Definition at line 92 of file gost_28147.cpp.
References Botan::Block_Cipher_Fixed_Params< 8, 32 >::assert_key_material_set(), Botan::Block_Cipher_Fixed_Params< 8, 32 >::BLOCK_SIZE, Botan::load_le(), and Botan::store_le().
|
inlinevirtualinherited |
|
overridevirtual |
Implements Botan::SymmetricAlgorithm.
Definition at line 146 of file gost_28147.cpp.
|
inlinefinalvirtualinherited |
Implements Botan::SymmetricAlgorithm.
Definition at line 201 of file block_cipher.h.
|
inlineinherited |
Definition at line 95 of file sym_algo.h.
|
inlineinherited |
Definition at line 100 of file sym_algo.h.
|
overridevirtual |
Implements Botan::SymmetricAlgorithm.
Definition at line 69 of file gost_28147.cpp.
Referenced by GOST_28147_89().
|
inlineoverridevirtual |
Implements Botan::BlockCipher.
Definition at line 67 of file gost_28147.h.
|
inlineinherited |
Definition at line 60 of file block_cipher.h.
|
inlinevirtualinherited |
Definition at line 55 of file block_cipher.h.
|
inlinevirtualinherited |
Definition at line 66 of file block_cipher.h.
|
staticinherited |
algo_spec | algorithm name |
Definition at line 45 of file block_cipher.cpp.
|
inlineinherited |
Set the symmetric key of this object.
key | the SymmetricKey to be set. |
Definition at line 113 of file sym_algo.h.
|
inlineinherited |
|
inherited |
Set the symmetric key of this object.
key | the contiguous byte range to be set. |
Definition at line 119 of file sym_algo.cpp.
|
inlineinherited |
Check whether a given key length is valid for this algorithm.
length | the key length to be checked. |
Definition at line 107 of file sym_algo.h.