diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2022-03-02 18:52:51 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2022-03-02 18:52:51 -0500 |
| commit | abae63c37dfcddbfcae3260edab4a1f939831390 (patch) | |
| tree | 21e510398b8c5200692328af0aa620eae3d20e12 /tests/crypto/main.cpp | |
| parent | 5eaa4434e85ff979b0881b428785bba6faaf0518 (diff) | |
| parent | c36ea26e5c6b94f107cc1aeb02a45cfc5a7c38ef (diff) | |
| download | monzero-core-abae63c37dfcddbfcae3260edab4a1f939831390.tar.gz monzero-core-abae63c37dfcddbfcae3260edab4a1f939831390.tar.xz monzero-core-abae63c37dfcddbfcae3260edab4a1f939831390.zip | |
Merge pull request #8052
c36ea26 fix ge_p3_is_point_at_infinity(), which is evaluating field elements that haven't been reduced by the field order (koe)
Diffstat (limited to 'tests/crypto/main.cpp')
| -rw-r--r-- | tests/crypto/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/crypto/main.cpp b/tests/crypto/main.cpp index f804c45dc..5486937c2 100644 --- a/tests/crypto/main.cpp +++ b/tests/crypto/main.cpp @@ -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); } |
