Skip to content

Add exhaustive test for ECDH module#1852

Open
theStack wants to merge 1 commit into
bitcoin-core:masterfrom
theStack:add_ecdh_exhaustive_test
Open

Add exhaustive test for ECDH module#1852
theStack wants to merge 1 commit into
bitcoin-core:masterfrom
theStack:add_ecdh_exhaustive_test

Conversation

@theStack
Copy link
Copy Markdown
Contributor

@theStack theStack commented May 2, 2026

This PR adds an exhaustive test for the ECDH module, looping over all key combinations and verifying the commutativity property (ECDH(i*G, j) == ECDH(j*G, i)) and checking against a recalculated ECDH result (by manually invoking the default ECDH hash function on the precalculated group element group[i * j]'s coordinates). The existing test coverage is already solid (including Wycheproof test vectors), but I figured it likely wouldn't hurt to add this as well.

Copy link
Copy Markdown
Contributor

@real-or-random real-or-random left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 6b9e4b8 nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants