summaryrefslogtreecommitdiff
path: root/keyDerivation.cpp
diff options
context:
space:
mode:
authorErwin Nindl <nine@wirdorange.org>2007-12-11 16:44:04 +0000
committerErwin Nindl <nine@wirdorange.org>2007-12-11 16:44:04 +0000
commit88af1429cb358f840a5aae553bee5ed886888243 (patch)
tree5362a239f8c62621d6959d219b37126833180592 /keyDerivation.cpp
parent* added mpi operator (diff)
kd iv generation fix again
Diffstat (limited to 'keyDerivation.cpp')
-rw-r--r--keyDerivation.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/keyDerivation.cpp b/keyDerivation.cpp
index 809a354..406e877 100644
--- a/keyDerivation.cpp
+++ b/keyDerivation.cpp
@@ -129,14 +129,11 @@ void KeyDerivation::generate(satp_prf_label label, seq_nr_t seq_nr, Buffer& key,
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 );
+
+ iv.clearHighBit(129);
err = gcry_cipher_setiv( cipher_ , iv.getBuf().getBuf(), iv.getBuf().getLength());
if( err )