crypto: make ec_point comparable

This commit is contained in:
jeffro256
2025-04-07 14:44:42 -05:00
committed by akildemir
parent c69c3e35fd
commit d9846bba74
2 changed files with 1 additions and 4 deletions

View File

@@ -371,6 +371,7 @@ inline const unsigned char* to_bytes(const crypto::ec_scalar &scalar) { return &
inline unsigned char* to_bytes(crypto::ec_point &point) { return &reinterpret_cast<unsigned char&>(point); }
inline const unsigned char* to_bytes(const crypto::ec_point &point) { return &reinterpret_cast<const unsigned char&>(point); }
CRYPTO_MAKE_HASHABLE(ec_point)
CRYPTO_MAKE_HASHABLE(public_key)
CRYPTO_MAKE_HASHABLE_CONSTANT_TIME(secret_key)
CRYPTO_MAKE_HASHABLE_CONSTANT_TIME(public_key_memsafe)

View File

@@ -49,10 +49,6 @@ bool operator !=(const ec_scalar &a, const ec_scalar &b) {
return 0 != memcmp(&a, &b, sizeof(ec_scalar));
}
bool operator !=(const ec_point &a, const ec_point &b) {
return 0 != memcmp(&a, &b, sizeof(ec_point));
}
bool operator !=(const key_derivation &a, const key_derivation &b) {
return 0 != memcmp(&a, &b, sizeof(key_derivation));
}