11#include <botan/block_cipher.h>
20 void encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
21 void decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
23 void clear()
override;
25 std::string
provider()
const override;
27 std::string
name()
const override {
return "AES-128"; }
29 std::unique_ptr<BlockCipher>
new_object()
const override {
return std::make_unique<AES_128>(); }
36 void key_schedule(std::span<const uint8_t> key)
override;
38#if defined(BOTAN_HAS_AES_VPERM)
39 void vperm_encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
40 void vperm_decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
41 void vperm_key_schedule(
const uint8_t key[],
size_t length);
44#if defined(BOTAN_HAS_AES_NI)
45 void aesni_key_schedule(
const uint8_t key[],
size_t length);
48#if defined(BOTAN_HAS_AES_POWER8) || defined(BOTAN_HAS_AES_ARMV8) || defined(BOTAN_HAS_AES_NI)
49 void hw_aes_encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
50 void hw_aes_decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
53#if defined(BOTAN_HAS_AES_VAES)
54 void x86_vaes_encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
55 void x86_vaes_decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
66 void encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
67 void decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
69 void clear()
override;
71 std::string
provider()
const override;
73 std::string
name()
const override {
return "AES-192"; }
75 std::unique_ptr<BlockCipher>
new_object()
const override {
return std::make_unique<AES_192>(); }
81#if defined(BOTAN_HAS_AES_VPERM)
82 void vperm_encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
83 void vperm_decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
84 void vperm_key_schedule(
const uint8_t key[],
size_t length);
87#if defined(BOTAN_HAS_AES_NI)
88 void aesni_key_schedule(
const uint8_t key[],
size_t length);
91#if defined(BOTAN_HAS_AES_POWER8) || defined(BOTAN_HAS_AES_ARMV8) || defined(BOTAN_HAS_AES_NI)
92 void hw_aes_encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
93 void hw_aes_decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
96#if defined(BOTAN_HAS_AES_VAES)
97 void x86_vaes_encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
98 void x86_vaes_decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
101 void key_schedule(std::span<const uint8_t> key)
override;
111 void encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
112 void decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const override;
114 void clear()
override;
116 std::string
provider()
const override;
118 std::string
name()
const override {
return "AES-256"; }
120 std::unique_ptr<BlockCipher>
new_object()
const override {
return std::make_unique<AES_256>(); }
126#if defined(BOTAN_HAS_AES_VPERM)
127 void vperm_encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
128 void vperm_decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
129 void vperm_key_schedule(
const uint8_t key[],
size_t length);
132#if defined(BOTAN_HAS_AES_NI)
133 void aesni_key_schedule(
const uint8_t key[],
size_t length);
136#if defined(BOTAN_HAS_AES_POWER8) || defined(BOTAN_HAS_AES_ARMV8) || defined(BOTAN_HAS_AES_NI)
137 void hw_aes_encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
138 void hw_aes_decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
141#if defined(BOTAN_HAS_AES_VAES)
142 void x86_vaes_encrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
143 void x86_vaes_decrypt_n(
const uint8_t in[], uint8_t out[],
size_t blocks)
const;
146 void key_schedule(std::span<const uint8_t> key)
override;
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
std::string provider() const override
size_t parallelism() const override
bool has_keying_material() const override
std::unique_ptr< BlockCipher > new_object() const override
std::string name() const override
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
bool has_keying_material() const override
std::string name() const override
std::unique_ptr< BlockCipher > new_object() const override
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
std::string provider() const override
size_t parallelism() const override
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
bool has_keying_material() const override
void encrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
void decrypt_n(const uint8_t in[], uint8_t out[], size_t blocks) const override
std::string name() const override
std::string provider() const override
size_t parallelism() const override
std::unique_ptr< BlockCipher > new_object() const override
int(* final)(unsigned char *, CTX *)
std::vector< T, secure_allocator< T > > secure_vector