aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf/kdf2/kdf2.cpp
diff options
context:
space:
mode:
authorKai Michaelis <[email protected]>2016-06-01 11:57:42 +0200
committerKai Michaelis <[email protected]>2016-06-01 11:57:42 +0200
commitcf74d1c376df1d9e6400e264a1d059720eeaa059 (patch)
treeac16b3e568c59a710af79020c0fee96887a9c4df /src/lib/kdf/kdf2/kdf2.cpp
parent57a3f3272c96a83c5c87c36761caee83982be498 (diff)
make sure kdf labels are always used
Diffstat (limited to 'src/lib/kdf/kdf2/kdf2.cpp')
-rw-r--r--src/lib/kdf/kdf2/kdf2.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/kdf/kdf2/kdf2.cpp b/src/lib/kdf/kdf2/kdf2.cpp
index 32bf678f7..760ebfc83 100644
--- a/src/lib/kdf/kdf2/kdf2.cpp
+++ b/src/lib/kdf/kdf2/kdf2.cpp
@@ -12,7 +12,7 @@ namespace Botan {
size_t KDF2::kdf(byte key[], size_t key_len,
const byte secret[], size_t secret_len,
const byte salt[], size_t salt_len,
- const byte[], size_t) const
+ const byte label[], size_t label_len) const
{
u32bit counter = 1;
secure_vector<byte> h;
@@ -22,6 +22,7 @@ size_t KDF2::kdf(byte key[], size_t key_len,
{
m_hash->update(secret, secret_len);
m_hash->update_be(counter++);
+ m_hash->update(label, label_len);
m_hash->update(salt, salt_len);
m_hash->final(h);