diff options
Diffstat (limited to 'src/kdf')
-rw-r--r-- | src/kdf/kdf.h | 50 | ||||
-rw-r--r-- | src/kdf/kdf1/kdf1.h | 4 | ||||
-rw-r--r-- | src/kdf/kdf2/kdf2.h | 4 | ||||
-rw-r--r-- | src/kdf/mgf1/mgf1.h | 4 | ||||
-rw-r--r-- | src/kdf/ssl_prf/prf_ssl3.h | 4 | ||||
-rw-r--r-- | src/kdf/tls_prf/prf_tls.h | 8 | ||||
-rw-r--r-- | src/kdf/x942_prf/prf_x942.h | 4 |
7 files changed, 58 insertions, 20 deletions
diff --git a/src/kdf/kdf.h b/src/kdf/kdf.h index 67078218f..ecf7f4621 100644 --- a/src/kdf/kdf.h +++ b/src/kdf/kdf.h @@ -13,31 +13,69 @@ namespace Botan { -/* +/** * Key Derivation Function */ class BOTAN_DLL KDF { public: + /** + * Derive a key + * @param key_len the desired output length in bytes + * @param secret the secret input + * @param salt a diversifier + */ SecureVector<byte> derive_key(u32bit key_len, const MemoryRegion<byte>& secret, const std::string& salt = "") const; + /** + * Derive a key + * @param key_len the desired output length in bytes + * @param secret the secret input + * @param salt a diversifier + */ SecureVector<byte> derive_key(u32bit key_len, const MemoryRegion<byte>& secret, const MemoryRegion<byte>& salt) const; + /** + * Derive a key + * @param key_len the desired output length in bytes + * @param secret the secret input + * @param salt a diversifier + * @param salt_len size of salt in bytes + */ SecureVector<byte> derive_key(u32bit key_len, const MemoryRegion<byte>& secret, - const byte salt[], u32bit salt_len) const; + const byte salt[], + u32bit salt_len) const; + /** + * Derive a key + * @param key_len the desired output length in bytes + * @param secret the secret input + * @param secret_len size of secret in bytes + * @param salt a diversifier + */ SecureVector<byte> derive_key(u32bit key_len, - const byte secret[], u32bit secret_len, + const byte secret[], + u32bit secret_len, const std::string& salt = "") const; + /** + * Derive a key + * @param key_len the desired output length in bytes + * @param secret the secret input + * @param secret_len size of secret in bytes + * @param salt a diversifier + * @param salt_len size of salt in bytes + */ SecureVector<byte> derive_key(u32bit key_len, - const byte secret[], u32bit secret_len, - const byte salt[], u32bit salt_len) const; + const byte secret[], + u32bit secret_len, + const byte salt[], + u32bit salt_len) const; virtual ~KDF() {} private: @@ -47,7 +85,7 @@ class BOTAN_DLL KDF const byte salt[], u32bit salt_len) const = 0; }; -/* +/** * Mask Generation Function */ class BOTAN_DLL MGF diff --git a/src/kdf/kdf1/kdf1.h b/src/kdf/kdf1/kdf1.h index d657cccc2..80ea470a9 100644 --- a/src/kdf/kdf1/kdf1.h +++ b/src/kdf/kdf1/kdf1.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* KDF1 +/** +* KDF1, from IEEE 1363 */ class BOTAN_DLL KDF1 : public KDF { diff --git a/src/kdf/kdf2/kdf2.h b/src/kdf/kdf2/kdf2.h index f748bed0f..1f01008c0 100644 --- a/src/kdf/kdf2/kdf2.h +++ b/src/kdf/kdf2/kdf2.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* KDF2 +/** +* KDF2, from IEEE 1363 */ class BOTAN_DLL KDF2 : public KDF { diff --git a/src/kdf/mgf1/mgf1.h b/src/kdf/mgf1/mgf1.h index 799ba7eed..2f7655fe2 100644 --- a/src/kdf/mgf1/mgf1.h +++ b/src/kdf/mgf1/mgf1.h @@ -13,8 +13,8 @@ namespace Botan { -/* -* MGF1 (Mask Generation Function) +/** +* MGF1 from PKCS #1 v2.0 */ class BOTAN_DLL MGF1 : public MGF { diff --git a/src/kdf/ssl_prf/prf_ssl3.h b/src/kdf/ssl_prf/prf_ssl3.h index 165fc7c3c..7d968eda1 100644 --- a/src/kdf/ssl_prf/prf_ssl3.h +++ b/src/kdf/ssl_prf/prf_ssl3.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* SSL3 PRF +/** +* PRF used in SSLv3 */ class BOTAN_DLL SSL3_PRF : public KDF { diff --git a/src/kdf/tls_prf/prf_tls.h b/src/kdf/tls_prf/prf_tls.h index 6d1787609..c7ad81a97 100644 --- a/src/kdf/tls_prf/prf_tls.h +++ b/src/kdf/tls_prf/prf_tls.h @@ -14,8 +14,8 @@ namespace Botan { -/* -* TLS PRF +/** +* PRF used in TLS 1.0/1.1 */ class BOTAN_DLL TLS_PRF : public KDF { @@ -31,8 +31,8 @@ class BOTAN_DLL TLS_PRF : public KDF MessageAuthenticationCode* hmac_sha1; }; -/* -* TLS 1.2 PRF +/** +* PRF used in TLS 1.2 */ class BOTAN_DLL TLS_12_PRF : public KDF { diff --git a/src/kdf/x942_prf/prf_x942.h b/src/kdf/x942_prf/prf_x942.h index f957566b0..a5fe9f351 100644 --- a/src/kdf/x942_prf/prf_x942.h +++ b/src/kdf/x942_prf/prf_x942.h @@ -12,8 +12,8 @@ namespace Botan { -/* -* X9.42 PRF +/** +* PRF from ANSI X9.42 */ class BOTAN_DLL X942_PRF : public KDF { |