diff --git a/src/protocol/CryptionHandler.cpp b/src/protocol/CryptionHandler.cpp index 06b3510..f5a8224 100644 --- a/src/protocol/CryptionHandler.cpp +++ b/src/protocol/CryptionHandler.cpp @@ -133,13 +133,13 @@ bool CryptionHandler::setupSharedSecretNew(const std::string &alpha, const std:: uint8_t shared[32]; uint8_t shared_iv[64]; - //ed25519_key_exchange(shared, (uint8_t*) publicKey, (uint8_t*) privateKey); + ed25519_key_exchange(shared, (uint8_t*) publicKey, (uint8_t*) privateKey); keyMul(shared, reinterpret_cast(publicKey), reinterpret_cast(privateKey), true); //Remote key get negated digest::sha512((char*) shared, 32, shared_iv); auto xor_key = alpha + beta; for(int i = 0; i < 64; i++) - shared_iv[i] ^= (uint8_t) xor_key[i]; + shared_iv[i] ^= xor_key[i]; { lock_guard lock(this->cache_key_lock);