aboutsummaryrefslogtreecommitdiffstats
path: root/src/constructs/fpe/fpe.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/constructs/fpe/fpe.h')
-rw-r--r--src/constructs/fpe/fpe.h32
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