summaryrefslogtreecommitdiff
path: root/keyDerivation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'keyDerivation.cpp')
-rw-r--r--keyDerivation.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/keyDerivation.cpp b/keyDerivation.cpp
index afe20f6..809a354 100644
--- a/keyDerivation.cpp
+++ b/keyDerivation.cpp
@@ -124,11 +124,16 @@ void KeyDerivation::generate(satp_prf_label label, seq_nr_t seq_nr, Buffer& key,
r = static_cast<long unsigned int>(seq_nr / ( 0x01 << ld_kdr_ ));
r = r.mul2exp(8);
- key_id = r + Mpi(static_cast<long unsigned int>(label));
+ key_id = r + static_cast<long unsigned int>(label);
Mpi salt = Mpi(salt_.getBuf(), salt_.getLength());
iv = key_id ^ salt;
+ std::cout << "KeyDerivation::generate: r_len: "<< r.getLen() << std::endl;
+ std::cout << "KeyDerivation::generate: key_id_len: "<< key_id.getLen() << std::endl;
+ std::cout << "KeyDerivation::generate: salt_len: "<< salt.getLen() << std::endl;
+ std::cout << "KeyDerivation::generate: iv_len: "<< iv.getLen() << std::endl;
+
err = gcry_cipher_reset( cipher_ );
if( err )
cLog.msg(Log::PRIO_ERR) << "KeyDerivation::generate: Failed to reset cipher: " << gpg_strerror( err );