Updated changelog
This commit is contained in:
parent
741aeacead
commit
0fbff778c2
@ -108,7 +108,7 @@ void _fe_neg(fe h, const fe f) {
|
||||
h[9] = h9;
|
||||
}
|
||||
|
||||
inline std::string keyMul(const uint8_t* publicKey /* compressed */, const uint8_t* privateKey /* uncompressed */, bool negate){
|
||||
inline void keyMul(uint8_t* target_buffer, const uint8_t* publicKey /* compressed */, const uint8_t* privateKey /* uncompressed */, bool negate){
|
||||
ge_p3 keyA{};
|
||||
ge_p2 result{};
|
||||
|
||||
@ -119,9 +119,7 @@ inline std::string keyMul(const uint8_t* publicKey /* compressed */, const uint8
|
||||
}
|
||||
ge_scalarmult_vartime(&result, privateKey, &keyA);
|
||||
|
||||
char buffer[32];
|
||||
ge_tobytes((uint8_t*) buffer, &result);
|
||||
return string(buffer, 32);
|
||||
ge_tobytes(target_buffer, &result);
|
||||
}
|
||||
|
||||
bool CryptionHandler::setupSharedSecretNew(const std::string &alpha, const std::string &beta, const char* privateKey /* uncompressed */, const char* publicKey /* compressed */) {
|
||||
@ -132,7 +130,7 @@ bool CryptionHandler::setupSharedSecretNew(const std::string &alpha, const std::
|
||||
string sharedIv;
|
||||
shared.resize(32, '\0');
|
||||
sharedIv.resize(64, '\0');
|
||||
shared = keyMul(reinterpret_cast<const uint8_t *>(publicKey), reinterpret_cast<const uint8_t *>(privateKey), true); //Remote key get negated
|
||||
keyMul((uint8_t*) shared.data(), reinterpret_cast<const uint8_t *>(publicKey), reinterpret_cast<const uint8_t *>(privateKey), true); //Remote key get negated
|
||||
sharedIv = digest::sha512(shared);
|
||||
|
||||
auto xor_key = alpha + beta;
|
||||
|
Loading…
Reference in New Issue
Block a user