8#ifndef BOTAN_FPE_FE1_H_
9#define BOTAN_FPE_FE1_H_
11#include <botan/bigint.h>
12#include <botan/sym_algo.h>
17class MessageAuthenticationCode;
36 bool compat_mode =
false,
37 std::string_view mac_algo =
"HMAC(SHA-256)");
43 bool has_keying_material()
const override;
45 std::string
name()
const override;
47 void clear()
override;
55 BigInt encrypt(
const BigInt& x,
const uint8_t tweak[],
size_t tweak_len)
const;
63 BigInt decrypt(
const BigInt& x,
const uint8_t tweak[],
size_t tweak_len)
const;
70 void key_schedule(std::span<const uint8_t> key)
override;
76 std::unique_ptr<MessageAuthenticationCode> m_mac;
77 std::unique_ptr<Modular_Reducer> mod_a;
78 std::vector<uint8_t> m_n_bytes;
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