aboutsummaryrefslogtreecommitdiffstats
path: root/doc/kdf.txt
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-04-22 18:41:31 +0000
committerlloyd <[email protected]>2011-04-22 18:41:31 +0000
commit4ddb5fc878b56c9d54d0e36b4eeba5b5273f503a (patch)
tree0bd34308e6a4be9c388da7aac613ea46bf924b1b /doc/kdf.txt
parentcff88d2385ed71d3cdece328a562b9cde84f4cd3 (diff)
Document KDF properly.
Split log by release series instead of year. Make dedicated landing page. If SPHINX_OPTS is set, it will be passed to sphinx-build
Diffstat (limited to 'doc/kdf.txt')
-rw-r--r--doc/kdf.txt32
1 files changed, 31 insertions, 1 deletions
diff --git a/doc/kdf.txt b/doc/kdf.txt
index feb458108..da916dcb3 100644
--- a/doc/kdf.txt
+++ b/doc/kdf.txt
@@ -4,4 +4,34 @@
Key Derivation Functions
========================================
-Todo
+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:: SecureVector<byte> derive_key( \
+ size_t key_len, const MemoryRegion<byte>& secret, \
+ const std::string& salt = "") const
+
+ .. cpp:function:: SecureVector<byte> derive_key( \
+ size_t key_len, const MemoryRegion<byte>& secret, \
+ const MemoryRegion<byte>& salt) const
+
+ .. cpp:function:: SecureVector<byte> derive_key( \
+ size_t key_len, const MemoryRegion<byte>& secret, \
+ const byte* salt, size_t salt_len) const
+
+ .. cpp:function:: SecureVector<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)
+