8#ifndef BOTAN_FPE_FE1_H_
9#define BOTAN_FPE_FE1_H_
11#include <botan/sym_algo.h>
12#include <botan/bigint.h>
17class MessageAuthenticationCode;
38 bool compat_mode =
false,
39 std::string_view mac_algo =
"HMAC(SHA-256)");
45 bool has_keying_material()
const override;
47 std::string
name()
const override;
49 void clear()
override;
57 BigInt encrypt(
const BigInt& x,
const uint8_t tweak[],
size_t tweak_len)
const;
65 BigInt decrypt(
const BigInt& x,
const uint8_t tweak[],
size_t tweak_len)
const;
71 void key_schedule(
const uint8_t key[],
size_t length)
override;
79 std::unique_ptr<MessageAuthenticationCode> m_mac;
80 std::unique_ptr<Modular_Reducer> mod_a;
81 std::vector<uint8_t> m_n_bytes;
105 const
std::vector<uint8_t>& tweak);
119 const
std::vector<uint8_t>& tweak);
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
BigInt fe1_decrypt(const BigInt &n, const BigInt &X, const SymmetricKey &key, const std::vector< uint8_t > &tweak)
BigInt fe1_encrypt(const BigInt &n, const BigInt &X, const SymmetricKey &key, const std::vector< uint8_t > &tweak)
std::vector< T, secure_allocator< T > > secure_vector