Fix derived monero pubkey assertion (#1272)

It was erroneously checking against the *x25519* pubkey instead of the
*ed25519* pubkey.
This commit is contained in:
Jason Rhinelander 2020-09-22 21:20:33 -03:00 committed by GitHub
parent ed23e6c6e7
commit 5ee1bf8a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -951,7 +951,7 @@ namespace cryptonote
std::memcpy(keys.key.data, pk_sh_data, 32);
if (!crypto::secret_key_to_public_key(keys.key, keys.pub))
throw std::runtime_error{"Failed to derive primary key from ed25519 key"};
assert(0 == std::memcmp(keys.pub.data, keys.pub_x25519.data, 32));
assert(0 == std::memcmp(keys.pub.data, keys.pub_ed25519.data, 32));
} else if (!init_key(m_config_folder + "/key", keys.key, keys.pub,
crypto::secret_key_to_public_key,
[](crypto::secret_key &key, crypto::public_key &pubkey) {