diff options
author | lloyd <[email protected]> | 2009-11-17 07:19:37 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-11-17 07:19:37 +0000 |
commit | e00b46cf9c1dcb364ebb7d5968d6ff9dcd600c4e (patch) | |
tree | 8ffb8d032f06bbcb7ab376c7469751a25b556dca /src/constructs/fpe/fpe.h | |
parent | a98a9ff5f95bd4dca9c1eda11e27e712c869cd66 (diff) |
Move most code that relies heavily on Filters into src/filters.
Remove support for (unused) modset settings.
Move tss, fpe, cryptobox, and aont to new dir constructs
Diffstat (limited to 'src/constructs/fpe/fpe.h')
-rw-r--r-- | src/constructs/fpe/fpe.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/constructs/fpe/fpe.h b/src/constructs/fpe/fpe.h new file mode 100644 index 000000000..fba1652d3 --- /dev/null +++ b/src/constructs/fpe/fpe.h @@ -0,0 +1,32 @@ +/* +* Format Preserving Encryption +* (C) 2009 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_FORMAT_PRESERVING_ENCRYPTION_H__ +#define BOTAN_FORMAT_PRESERVING_ENCRYPTION_H__ + +#include <botan/bigint.h> +#include <botan/symkey.h> + +namespace Botan { + +/* +* Encrypt X from and onto the group Z_n using key and tweak +*/ +BigInt fpe_encrypt(const BigInt& n, const BigInt& X, + const SymmetricKey& key, + const MemoryRegion<byte>& tweak); + +/* +* Decrypt X from and onto the group Z_n using key and tweak +*/ +BigInt fpe_decrypt(const BigInt& n, const BigInt& X, + const SymmetricKey& key, + const MemoryRegion<byte>& tweak); + +} + +#endif |