Skip to content

Commit 3cba981

Browse files
RandomLatticeandozw
andcommitted
PR feedback: add more wycheproof ECDH test cases
Co-authored-by: Sean Andersen <[email protected]>
1 parent f26c323 commit 3cba981

File tree

3 files changed

+583
-491
lines changed

3 files changed

+583
-491
lines changed

src/modules/ecdh/tests_impl.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#define SECP256K1_MODULE_ECDH_TESTS_H
99

1010
static int ecdh_hash_function_test_xpassthru(unsigned char *output, const unsigned char *x, const unsigned char *y, void *data) {
11-
(void)x;
1211
(void)y;
1312
(void)data;
1413
memcpy(output, x, 32);
@@ -170,8 +169,7 @@ static void test_ecdh_wycheproof(void) {
170169

171170
expected_result = testvectors[t].expected_result;
172171

173-
/* fail if public key is valid, but doesn't parse */
174-
CHECK(parsed_ok || expected_result == 0);
172+
CHECK(parsed_ok == expected_result);
175173

176174
if (!parsed_ok && expected_result == 0) {
177175
continue;

0 commit comments

Comments
 (0)