From cf74d1c376df1d9e6400e264a1d059720eeaa059 Mon Sep 17 00:00:00 2001 From: Kai Michaelis Date: Wed, 1 Jun 2016 11:57:42 +0200 Subject: make sure kdf labels are always used --- src/lib/kdf/kdf2/kdf2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/kdf/kdf2/kdf2.cpp') 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 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); -- cgit v1.2.3