aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf/hkdf/hkdf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/kdf/hkdf/hkdf.cpp')
-rw-r--r--src/lib/kdf/hkdf/hkdf.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/kdf/hkdf/hkdf.cpp b/src/lib/kdf/hkdf/hkdf.cpp
index 6f83853f9..56dc72f09 100644
--- a/src/lib/kdf/hkdf/hkdf.cpp
+++ b/src/lib/kdf/hkdf/hkdf.cpp
@@ -22,7 +22,8 @@ HKDF* HKDF::make(const Spec& spec)
size_t HKDF::kdf(byte out[], size_t out_len,
const byte secret[], size_t secret_len,
- const byte salt[], size_t salt_len) const
+ const byte salt[], size_t salt_len,
+ const byte label[], size_t label_len) const
{
m_prf->set_key(secret, secret_len);
@@ -33,6 +34,7 @@ size_t HKDF::kdf(byte out[], size_t out_len,
while(offset != out_len && counter != 0)
{
m_prf->update(h);
+ m_prf->update(label, label_len);
m_prf->update(salt, salt_len);
m_prf->update(counter++);
m_prf->final(h);