summaryrefslogtreecommitdiff
path: root/keyDerivation.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-02-24 00:07:01 +0000
committerChristian Pointner <equinox@anytun.org>2008-02-24 00:07:01 +0000
commit97d40fa80b08194c043a64d2352ca2cbc9be2873 (patch)
tree1819295d33262b386e2c333258bc9f6fd1c07a0b /keyDerivation.cpp
parent- keyderivation and cipher should work now (diff)
bugfix@ sender and receiver reset packet size at begin of loop
bugfix@ keyDerivation key_derivation_rate
Diffstat (limited to 'keyDerivation.cpp')
-rw-r--r--keyDerivation.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/keyDerivation.cpp b/keyDerivation.cpp
index dbafec6..cfd70d4 100644
--- a/keyDerivation.cpp
+++ b/keyDerivation.cpp
@@ -102,8 +102,10 @@ void KeyDerivation::generate(satp_prf_label label, seq_nr_t seq_nr, Buffer& key)
r = 0; // TODO: no new key should be generated if r == 0, except it is the first time
else
{
- Mpi seq = seq_nr;
- Mpi rate = 1;
+ Mpi seq(32);
+ seq = seq_nr;
+ Mpi rate(48);
+ rate = 1;
rate = rate.mul2exp(ld_kdr_);
r = seq / rate;
}