aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-28 18:03:20 +0000
committerlloyd <[email protected]>2008-09-28 18:03:20 +0000
commit47ffeed7f8270855596c4f1d7b2d405172d78e8c (patch)
tree371535473f023f310a9c9c0281d5f62b3faedad0 /include
parent389dd2cdf55a57960581f686a8a766475a1f5d38 (diff)
Modularize KDFs, PBKDFs, and PRFs
Diffstat (limited to 'include')
-rw-r--r--include/kdf.h81
-rw-r--r--include/pgp_s2k.h30
-rw-r--r--include/pkcs5.h45
3 files changed, 0 insertions, 156 deletions
diff --git a/include/kdf.h b/include/kdf.h
deleted file mode 100644
index ad7a11dbe..000000000
--- a/include/kdf.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*************************************************
-* KDF Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_KDF_H__
-#define BOTAN_KDF_H__
-
-#include <botan/pk_util.h>
-
-namespace Botan {
-
-/*************************************************
-* KDF1 *
-*************************************************/
-class BOTAN_DLL KDF1 : public KDF
- {
- public:
- SecureVector<byte> derive(u32bit, const byte[], u32bit,
- const byte[], u32bit) const;
-
- KDF1(const std::string&);
- private:
- const std::string hash_name;
- };
-
-/*************************************************
-* KDF2 *
-*************************************************/
-class BOTAN_DLL KDF2 : public KDF
- {
- public:
- SecureVector<byte> derive(u32bit, const byte[], u32bit,
- const byte[], u32bit) const;
-
- KDF2(const std::string&);
- private:
- const std::string hash_name;
- };
-
-/*************************************************
-* X9.42 PRF *
-*************************************************/
-class BOTAN_DLL X942_PRF : public KDF
- {
- public:
- SecureVector<byte> derive(u32bit, const byte[], u32bit,
- const byte[], u32bit) const;
-
- X942_PRF(const std::string&);
- private:
- std::string key_wrap_oid;
- };
-
-/*************************************************
-* SSL3 PRF *
-*************************************************/
-class BOTAN_DLL SSL3_PRF : public KDF
- {
- public:
- SecureVector<byte> derive(u32bit, const byte[], u32bit,
- const byte[], u32bit) const;
- };
-
-/*************************************************
-* TLS PRF *
-*************************************************/
-class BOTAN_DLL TLS_PRF : public KDF
- {
- public:
- SecureVector<byte> derive(u32bit, const byte[], u32bit,
- const byte[], u32bit) const;
- private:
- SecureVector<byte> P_hash(const std::string&, u32bit,
- const byte[], u32bit,
- const byte[], u32bit) const;
- };
-
-}
-
-#endif
diff --git a/include/pgp_s2k.h b/include/pgp_s2k.h
deleted file mode 100644
index cd263a735..000000000
--- a/include/pgp_s2k.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*************************************************
-* OpenPGP S2K Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_OPENPGP_S2K_H__
-#define BOTAN_OPENPGP_S2K_H__
-
-#include <botan/s2k.h>
-
-namespace Botan {
-
-/*************************************************
-* OpenPGP S2K *
-*************************************************/
-class BOTAN_DLL OpenPGP_S2K : public S2K
- {
- public:
- std::string name() const;
- S2K* clone() const;
- OpenPGP_S2K(const std::string&);
- private:
- OctetString derive(u32bit, const std::string&,
- const byte[], u32bit, u32bit) const;
- const std::string hash_name;
- };
-
-}
-
-#endif
diff --git a/include/pkcs5.h b/include/pkcs5.h
deleted file mode 100644
index 22b16b7c5..000000000
--- a/include/pkcs5.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*************************************************
-* PKCS #5 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#ifndef BOTAN_PKCS5_H__
-#define BOTAN_PKCS5_H__
-
-#include <botan/s2k.h>
-
-namespace Botan {
-
-/*************************************************
-* PKCS #5 PBKDF1 *
-*************************************************/
-class BOTAN_DLL PKCS5_PBKDF1 : public S2K
- {
- public:
- std::string name() const;
- S2K* clone() const { return new PKCS5_PBKDF1(hash_name); }
- PKCS5_PBKDF1(const std::string&);
- private:
- OctetString derive(u32bit, const std::string&,
- const byte[], u32bit, u32bit) const;
- const std::string hash_name;
- };
-
-/*************************************************
-* PKCS #5 PBKDF2 *
-*************************************************/
-class BOTAN_DLL PKCS5_PBKDF2 : public S2K
- {
- public:
- std::string name() const;
- S2K* clone() const { return new PKCS5_PBKDF2(hash_name); }
- PKCS5_PBKDF2(const std::string&);
- private:
- OctetString derive(u32bit, const std::string&,
- const byte[], u32bit, u32bit) const;
- const std::string hash_name;
- };
-
-}
-
-#endif