aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-10 14:59:08 +0000
committerlloyd <[email protected]>2008-11-10 14:59:08 +0000
commit9ebe6ec5d24c6b28eb8d44b4204e42dda600fb4d (patch)
tree7f7a26de2d6ec50a12426b37359551618a194f52
parent52fa0b875ad616dd997ac6253f92ffb18812209c (diff)
Split pk_pad.h into eme.h and emsa.h
-rw-r--r--src/libstate/lookup.h3
-rw-r--r--src/pk_pad/eme.cpp (renamed from src/pk_pad/pk_pad.cpp)4
-rw-r--r--src/pk_pad/eme.h (renamed from src/pk_pad/pk_pad.h)24
-rw-r--r--src/pk_pad/eme1/eme1.h2
-rw-r--r--src/pk_pad/eme_pkcs/eme_pkcs.h2
-rw-r--r--src/pk_pad/emsa.h34
-rw-r--r--src/pk_pad/emsa1/emsa1.h2
-rw-r--r--src/pk_pad/emsa2/emsa2.h2
-rw-r--r--src/pk_pad/emsa3/emsa3.h2
-rw-r--r--src/pk_pad/emsa4/emsa4.h2
-rw-r--r--src/pk_pad/emsa_raw/emsa_raw.h2
-rw-r--r--src/pk_pad/info.txt7
-rw-r--r--src/pubkey/pubkey/pubkey.h3
13 files changed, 54 insertions, 35 deletions
diff --git a/src/libstate/lookup.h b/src/libstate/lookup.h
index 868765874..eda367543 100644
--- a/src/libstate/lookup.h
+++ b/src/libstate/lookup.h
@@ -15,7 +15,8 @@
#include <botan/filters.h>
#include <botan/mode_pad.h>
#include <botan/kdf.h>
-#include <botan/pk_pad.h>
+#include <botan/eme.h>
+#include <botan/emsa.h>
namespace Botan {
diff --git a/src/pk_pad/pk_pad.cpp b/src/pk_pad/eme.cpp
index 23dc9a95b..ca618889b 100644
--- a/src/pk_pad/pk_pad.cpp
+++ b/src/pk_pad/eme.cpp
@@ -1,9 +1,9 @@
/*************************************************
-* EME/EMSA Base Class Source File *
+* EME Base Class Source File *
* (C) 1999-2008 Jack Lloyd *
*************************************************/
-#include <botan/pk_pad.h>
+#include <botan/eme.h>
namespace Botan {
diff --git a/src/pk_pad/pk_pad.h b/src/pk_pad/eme.h
index e26235c74..fd759bd10 100644
--- a/src/pk_pad/pk_pad.h
+++ b/src/pk_pad/eme.h
@@ -1,10 +1,10 @@
/*************************************************
-* EME/EMSA Classes Header File *
+* EME Classes Header File *
* (C) 1999-2007 Jack Lloyd *
*************************************************/
-#ifndef BOTAN_PUBKEY_PAD_H__
-#define BOTAN_PUBKEY_PAD_H__
+#ifndef BOTAN_PUBKEY_EME_ENCRYPTION_PAD_H__
+#define BOTAN_PUBKEY_EME_ENCRYPTION_PAD_H__
#include <botan/secmem.h>
#include <botan/rng.h>
@@ -35,24 +35,6 @@ class BOTAN_DLL EME
virtual SecureVector<byte> unpad(const byte[], u32bit, u32bit) const = 0;
};
-/*************************************************
-* Encoding Method for Signatures, Appendix *
-*************************************************/
-class BOTAN_DLL EMSA
- {
- public:
- virtual void update(const byte[], u32bit) = 0;
- virtual SecureVector<byte> raw_data() = 0;
-
- virtual SecureVector<byte> encoding_of(const MemoryRegion<byte>&,
- u32bit,
- RandomNumberGenerator& rng) = 0;
-
- virtual bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
- u32bit) throw() = 0;
- virtual ~EMSA() {}
- };
-
}
#endif
diff --git a/src/pk_pad/eme1/eme1.h b/src/pk_pad/eme1/eme1.h
index 206f6e168..a0676b7df 100644
--- a/src/pk_pad/eme1/eme1.h
+++ b/src/pk_pad/eme1/eme1.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_EME1_H__
#define BOTAN_EME1_H__
-#include <botan/pk_pad.h>
+#include <botan/eme.h>
#include <botan/kdf.h>
#include <botan/hash.h>
diff --git a/src/pk_pad/eme_pkcs/eme_pkcs.h b/src/pk_pad/eme_pkcs/eme_pkcs.h
index f23a9733d..76817826d 100644
--- a/src/pk_pad/eme_pkcs/eme_pkcs.h
+++ b/src/pk_pad/eme_pkcs/eme_pkcs.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_EME_PKCS1_H__
#define BOTAN_EME_PKCS1_H__
-#include <botan/pk_pad.h>
+#include <botan/eme.h>
namespace Botan {
diff --git a/src/pk_pad/emsa.h b/src/pk_pad/emsa.h
new file mode 100644
index 000000000..2f2b160bd
--- /dev/null
+++ b/src/pk_pad/emsa.h
@@ -0,0 +1,34 @@
+/*************************************************
+* EMSA Classes Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_PUBKEY_EMSA_H__
+#define BOTAN_PUBKEY_EMSA_H__
+
+#include <botan/secmem.h>
+#include <botan/rng.h>
+
+namespace Botan {
+
+/*************************************************
+* Encoding Method for Signatures, Appendix *
+*************************************************/
+class BOTAN_DLL EMSA
+ {
+ public:
+ virtual void update(const byte[], u32bit) = 0;
+ virtual SecureVector<byte> raw_data() = 0;
+
+ virtual SecureVector<byte> encoding_of(const MemoryRegion<byte>&,
+ u32bit,
+ RandomNumberGenerator& rng) = 0;
+
+ virtual bool verify(const MemoryRegion<byte>&, const MemoryRegion<byte>&,
+ u32bit) throw() = 0;
+ virtual ~EMSA() {}
+ };
+
+}
+
+#endif
diff --git a/src/pk_pad/emsa1/emsa1.h b/src/pk_pad/emsa1/emsa1.h
index 6b058438c..64255e748 100644
--- a/src/pk_pad/emsa1/emsa1.h
+++ b/src/pk_pad/emsa1/emsa1.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_EMSA1_H__
#define BOTAN_EMSA1_H__
-#include <botan/pk_pad.h>
+#include <botan/emsa.h>
#include <botan/hash.h>
namespace Botan {
diff --git a/src/pk_pad/emsa2/emsa2.h b/src/pk_pad/emsa2/emsa2.h
index 9d7f6c962..367dd86ab 100644
--- a/src/pk_pad/emsa2/emsa2.h
+++ b/src/pk_pad/emsa2/emsa2.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_EMSA2_H__
#define BOTAN_EMSA2_H__
-#include <botan/pk_pad.h>
+#include <botan/emsa.h>
#include <botan/hash.h>
namespace Botan {
diff --git a/src/pk_pad/emsa3/emsa3.h b/src/pk_pad/emsa3/emsa3.h
index a994f636e..620cf9d21 100644
--- a/src/pk_pad/emsa3/emsa3.h
+++ b/src/pk_pad/emsa3/emsa3.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_EMSA3_H__
#define BOTAN_EMSA3_H__
-#include <botan/pk_pad.h>
+#include <botan/emsa.h>
#include <botan/hash.h>
namespace Botan {
diff --git a/src/pk_pad/emsa4/emsa4.h b/src/pk_pad/emsa4/emsa4.h
index 37b783bfe..190725926 100644
--- a/src/pk_pad/emsa4/emsa4.h
+++ b/src/pk_pad/emsa4/emsa4.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_EMSA4_H__
#define BOTAN_EMSA4_H__
-#include <botan/pk_pad.h>
+#include <botan/emsa.h>
#include <botan/hash.h>
#include <botan/kdf.h>
diff --git a/src/pk_pad/emsa_raw/emsa_raw.h b/src/pk_pad/emsa_raw/emsa_raw.h
index 923a390d3..df719bf27 100644
--- a/src/pk_pad/emsa_raw/emsa_raw.h
+++ b/src/pk_pad/emsa_raw/emsa_raw.h
@@ -6,7 +6,7 @@
#ifndef BOTAN_EMSA_RAW_H__
#define BOTAN_EMSA_RAW_H__
-#include <botan/pk_pad.h>
+#include <botan/emsa.h>
namespace Botan {
diff --git a/src/pk_pad/info.txt b/src/pk_pad/info.txt
index d28ddd9fc..ff750a12c 100644
--- a/src/pk_pad/info.txt
+++ b/src/pk_pad/info.txt
@@ -1,10 +1,11 @@
-realname "Public Key Signature and Encryption Padding"
+realname "Public Key EME/EMSA Padding Modes"
define PK_PADDING
load_on auto
<add>
-pk_pad.cpp
-pk_pad.h
+emsa.h
+eme.cpp
+eme.h
</add>
diff --git a/src/pubkey/pubkey/pubkey.h b/src/pubkey/pubkey/pubkey.h
index 14faa1096..fec56243f 100644
--- a/src/pubkey/pubkey/pubkey.h
+++ b/src/pubkey/pubkey/pubkey.h
@@ -7,9 +7,10 @@
#define BOTAN_PUBKEY_H__
#include <botan/pk_keys.h>
-#include <botan/pk_pad.h>
#include <botan/symkey.h>
#include <botan/rng.h>
+#include <botan/eme.h>
+#include <botan/emsa.h>
namespace Botan {