Browse Source

correct new key pair

pull/996/head
orignal 7 years ago
parent
commit
80a3bd6a3b
  1. 2
      libi2pd/CryptoKey.cpp
  2. 3
      libi2pd/Destination.cpp

2
libi2pd/CryptoKey.cpp

@ -141,7 +141,7 @@ namespace crypto @@ -141,7 +141,7 @@ namespace crypto
EC_POINT_get_affine_coordinates_GFp (curve->GetGroup (), p, x, y, NULL);
bn2buf (x, pub, 32);
bn2buf (y, pub + 32, 32);
RAND_bytes (priv + 64, 192);
RAND_bytes (pub + 64, 192);
EC_POINT_free (p);
BN_free (x); BN_free (y);
}

3
libi2pd/Destination.cpp

@ -929,7 +929,8 @@ namespace client @@ -929,7 +929,8 @@ namespace client
}
LogPrint (eLogInfo, "Destination: Creating new temporary keys for address ", ident, ".b32.i2p");
i2p::crypto::GenerateElGamalKeyPair(m_EncryptionPrivateKey, m_EncryptionPublicKey);
i2p::data::PrivateKeys::GenerateCryptoKeyPair(GetIdentity ()->GetCryptoKeyType (),
m_EncryptionPrivateKey, m_EncryptionPublicKey);
std::ofstream f1 (path, std::ofstream::binary | std::ofstream::out);
if (f1) {

Loading…
Cancel
Save