|
|
@ -305,14 +305,13 @@ namespace rct {
|
|
|
|
//checks if A, B are equal as curve points
|
|
|
|
//checks if A, B are equal as curve points
|
|
|
|
//without doing curve operations
|
|
|
|
//without doing curve operations
|
|
|
|
bool equalKeys(const key & a, const key & b) {
|
|
|
|
bool equalKeys(const key & a, const key & b) {
|
|
|
|
key eqk;
|
|
|
|
bool rv = true;
|
|
|
|
sc_sub(eqk.bytes, cn_fast_hash(a).bytes, cn_fast_hash(b).bytes);
|
|
|
|
for (int i = 0; i < 32; ++i) {
|
|
|
|
if (sc_isnonzero(eqk.bytes) ) {
|
|
|
|
if (a.bytes[i] != b.bytes[i]) {
|
|
|
|
//DP("eq bytes");
|
|
|
|
rv = false;
|
|
|
|
//DP(eqk);
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return rv;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//Hashing - cn_fast_hash
|
|
|
|
//Hashing - cn_fast_hash
|
|
|
|