aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/dlies/dlies.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-13 21:51:07 +0000
committerlloyd <[email protected]>2010-09-13 21:51:07 +0000
commit3a8202e6c0a372e222d03744686241e8101829d3 (patch)
tree4fec1a844575e5fdfbba2e0b57f439368706f1b2 /src/pubkey/dlies/dlies.cpp
parentd34529a53979bc5be37c37f0250ad358c1f18e1c (diff)
Remove constructors of MemoryVector and SecureVector that took two
MemoryRegions and concatenated them.
Diffstat (limited to 'src/pubkey/dlies/dlies.cpp')
-rw-r--r--src/pubkey/dlies/dlies.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pubkey/dlies/dlies.cpp b/src/pubkey/dlies/dlies.cpp
index 07477fd5d..5dd557b6f 100644
--- a/src/pubkey/dlies/dlies.cpp
+++ b/src/pubkey/dlies/dlies.cpp
@@ -46,7 +46,8 @@ SecureVector<byte> DLIES_Encryptor::enc(const byte in[], u32bit length,
out.copy(my_key, my_key.size());
out.copy(my_key.size(), in, length);
- SecureVector<byte> vz(my_key, ka.derive_key(0, other_key).bits_of());
+ SecureVector<byte> vz = my_key;
+ vz.append(ka.derive_key(0, other_key).bits_of());
const u32bit K_LENGTH = length + mac_keylen;
OctetString K = kdf->derive_key(K_LENGTH, vz, vz.size());
@@ -118,7 +119,8 @@ SecureVector<byte> DLIES_Decryptor::dec(const byte msg[], u32bit length) const
SecureVector<byte> C(msg + my_key.size(), CIPHER_LEN);
SecureVector<byte> T(msg + my_key.size() + CIPHER_LEN, mac->OUTPUT_LENGTH);
- SecureVector<byte> vz(v, ka.derive_key(0, v).bits_of());
+ SecureVector<byte> vz(msg, my_key.size());
+ vz.append(ka.derive_key(0, v).bits_of());
const u32bit K_LENGTH = C.size() + mac_keylen;
OctetString K = kdf->derive_key(K_LENGTH, vz, vz.size());