aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-11-04 02:13:29 +0000
committerlloyd <[email protected]>2010-11-04 02:13:29 +0000
commit20191a0e123d0098375be099fcce22f6a6415402 (patch)
treefc17c42295acee6bf168c3f61ca2470f7d1aa0a0 /src/engine
parent51e9d52e4fcfcf486ee53af1a42c98e841bcfde0 (diff)
Move PBKDF lookups to engine
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/core_engine/core_engine.h3
-rw-r--r--src/engine/core_engine/info.txt1
-rw-r--r--src/engine/dyn_engine/dyn_engine.cpp2
-rw-r--r--src/engine/dyn_engine/dyn_engine.h6
-rw-r--r--src/engine/engine.cpp7
-rw-r--r--src/engine/engine.h9
-rw-r--r--src/engine/info.txt1
7 files changed, 28 insertions, 1 deletions
diff --git a/src/engine/core_engine/core_engine.h b/src/engine/core_engine/core_engine.h
index b8b8262ce..5386991c3 100644
--- a/src/engine/core_engine/core_engine.h
+++ b/src/engine/core_engine/core_engine.h
@@ -49,6 +49,9 @@ class Core_Engine : public Engine
MessageAuthenticationCode* find_mac(const SCAN_Name& reqeust,
Algorithm_Factory&) const;
+
+ PBKDF* find_pbkdf(const SCAN_Name& algo_spec,
+ Algorithm_Factory& af) const;
};
/**
diff --git a/src/engine/core_engine/info.txt b/src/engine/core_engine/info.txt
index ea059b3c6..1935b0518 100644
--- a/src/engine/core_engine/info.txt
+++ b/src/engine/core_engine/info.txt
@@ -12,6 +12,7 @@ lookup_block.cpp
lookup_hash.cpp
lookup_mac.cpp
lookup_stream.cpp
+lookup_pbkdf.cpp
</source>
<requires>
diff --git a/src/engine/dyn_engine/dyn_engine.cpp b/src/engine/dyn_engine/dyn_engine.cpp
index 83169f431..b76544d0f 100644
--- a/src/engine/dyn_engine/dyn_engine.cpp
+++ b/src/engine/dyn_engine/dyn_engine.cpp
@@ -32,7 +32,7 @@ Dynamically_Loaded_Engine::Dynamically_Loaded_Engine(
const u32bit mod_version = get_version();
- if(mod_version != 20100908)
+ if(mod_version != 20101003)
throw std::runtime_error("Incompatible version in " +
library_path + " of " +
to_string(mod_version));
diff --git a/src/engine/dyn_engine/dyn_engine.h b/src/engine/dyn_engine/dyn_engine.h
index 46752f5a9..d8e92cb02 100644
--- a/src/engine/dyn_engine/dyn_engine.h
+++ b/src/engine/dyn_engine/dyn_engine.h
@@ -49,6 +49,12 @@ class BOTAN_DLL Dynamically_Loaded_Engine : public Engine
return engine->find_mac(algo_spec, af);
}
+ PBKDF* find_pbkdf(const SCAN_Name& algo_spec,
+ Algorithm_Factory& af) const
+ {
+ return engine->find_pbkdf(algo_spec, af);
+ }
+
Modular_Exponentiator* mod_exp(const BigInt& n,
Power_Mod::Usage_Hints hints) const
{
diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp
index 958d4148f..80712a2f8 100644
--- a/src/engine/engine.cpp
+++ b/src/engine/engine.cpp
@@ -37,6 +37,13 @@ Engine::find_mac(const SCAN_Name&,
return 0;
}
+PBKDF*
+Engine::find_pbkdf(const SCAN_Name&,
+ Algorithm_Factory&) const
+ {
+ return 0;
+ }
+
Modular_Exponentiator*
Engine::mod_exp(const BigInt&,
Power_Mod::Usage_Hints) const
diff --git a/src/engine/engine.h b/src/engine/engine.h
index c9bcd6126..a322b68ec 100644
--- a/src/engine/engine.h
+++ b/src/engine/engine.h
@@ -14,6 +14,7 @@
#include <botan/stream_cipher.h>
#include <botan/hash.h>
#include <botan/mac.h>
+#include <botan/pbkdf.h>
#include <botan/pow_mod.h>
#include <botan/pk_keys.h>
#include <botan/pk_ops.h>
@@ -79,6 +80,14 @@ class BOTAN_DLL Engine
Algorithm_Factory& af) const;
/**
+ * @param algo_spec the algorithm name/specification
+ * @param af an algorithm factory object
+ * @return newly allocated object, or NULL
+ */
+ virtual PBKDF* find_pbkdf(const SCAN_Name& algo_spec,
+ Algorithm_Factory& af) const;
+
+ /**
* @param n the modulus
* @param hints any use hints
* @return newly allocated object, or NULL
diff --git a/src/engine/info.txt b/src/engine/info.txt
index 5f787cebe..0c73450bc 100644
--- a/src/engine/info.txt
+++ b/src/engine/info.txt
@@ -14,6 +14,7 @@ hash
libstate
mac
numbertheory
+pbkdf
pubkey
stream
</requires>