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 const std::string& mac_algo =
"HMAC(SHA-256)");
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;
69 void key_schedule(
const uint8_t key[],
size_t length)
override;
77 std::unique_ptr<MessageAuthenticationCode> m_mac;
78 std::unique_ptr<Modular_Reducer> mod_a;
79 std::vector<uint8_t> m_n_bytes;
103 const
std::vector<uint8_t>& tweak);
117 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