aboutsummaryrefslogtreecommitdiffstats
path: root/doc/manual/kdf.rst
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-10 23:07:16 +0000
committerlloyd <[email protected]>2014-01-10 23:07:16 +0000
commitad6555f522ae16f6284e8dafa02f630b88bcf289 (patch)
treebd63c51dbeab75eb0f90c72589bc922141237056 /doc/manual/kdf.rst
parent6894dca64c04936d07048c0e8cbf7e25858548c3 (diff)
Split up docs into the reference manual, the website, and everything else.
Add `website` target to makefile. Some progress towards fixing minimized builds. TLS now hard requires ECDSA and GCM since otherwise a minimized build has only insecure options. Remove boost_thread dependency in command line tool
Diffstat (limited to 'doc/manual/kdf.rst')
-rw-r--r--doc/manual/kdf.rst37
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/manual/kdf.rst b/doc/manual/kdf.rst
new file mode 100644
index 000000000..4ab2fd5dc
--- /dev/null
+++ b/doc/manual/kdf.rst
@@ -0,0 +1,37 @@
+
+.. _key_derivation_function:
+
+Key Derivation Functions
+========================================
+
+Key derivation functions are used to turn some amount of shared secret
+material into uniform random keys suitable for use with symmetric
+algorithms. An example of an input which is useful for a KDF is a
+shared secret created using Diffie-Hellman key agreement.
+
+.. cpp:class:: KDF
+
+ .. cpp:function:: secure_vector<byte> derive_key( \
+ size_t key_len, const std::vector<byte>& secret, \
+ const std::string& salt = "") const
+
+ .. cpp:function:: secure_vector<byte> derive_key( \
+ size_t key_len, const std::vector<byte>& secret, \
+ const std::vector<byte>& salt) const
+
+ .. cpp:function:: secure_vector<byte> derive_key( \
+ size_t key_len, const std::vector<byte>& secret, \
+ const byte* salt, size_t salt_len) const
+
+ .. cpp:function:: secure_vector<byte> derive_key( \
+ size_t key_len, const byte* secret, size_t secret_len, \
+ const std::string& salt) const
+
+ All variations on the same theme. Deterministically creates a
+ uniform random value from *secret* and *salt*. Typically *salt* is
+ a lable or identifier, such as a session id.
+
+You can create a :cpp:class:`KDF` using
+
+.. cpp:function:: KDF* get_kdf(const std::string& algo_spec)
+