mirror of
https://github.com/monero-project/monero.git
synced 2025-05-08 00:15:04 -04:00
fix ge_p3_is_point_at_infinity(), which is evaluating field elements that haven't been reduced by the field order
This commit is contained in:
parent
eec3a6014c
commit
c36ea26e5c
7 changed files with 111 additions and 11 deletions
|
@ -259,6 +259,16 @@ int main(int argc, char *argv[]) {
|
|||
if (expected != actual) {
|
||||
goto error;
|
||||
}
|
||||
} else if (cmd == "check_ge_p3_identity") {
|
||||
cerr << "Testing: " << cmd << endl;
|
||||
public_key point;
|
||||
bool expected_bad, expected_good, result_badfunc, result_goodfunc;
|
||||
get(input, point, expected_bad, expected_good);
|
||||
result_badfunc = check_ge_p3_identity_failure(point);
|
||||
result_goodfunc = check_ge_p3_identity_success(point);
|
||||
if (expected_bad != result_badfunc || expected_good != result_goodfunc) {
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
throw ios_base::failure("Unknown function: " + cmd);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue