Page MenuHomePhabricator

Use pure python for functional tests schnorr computation
ClosedPublic

Authored by Fabien on Sep 18 2020, 15:25.

Details

Summary

This is a follow-up for D5965.
It converts our current schnorr.py library to use the framework from
key.py and remove openssl as a dependency for the functional tests.

Test Plan
ninja check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Sep 18 2020, 15:25
deadalnix added inline comments.
test/functional/test_framework/key.py
210 ↗(On Diff #23585)

The field size is 256bits, not this humongous number.

399 ↗(On Diff #23585)

Is there a reason you implemented this rather than just picking something random like for ecdsa? This seems rather inconsistent, more code, and the benefit is dubious for the test framework.

deadalnix requested changes to this revision.Sep 18 2020, 23:21

At least for the field size thing.

This revision now requires changes to proceed.Sep 18 2020, 23:21

Deduplicate the field prime (and not size...), use a random nonce.

test/functional/test_framework/key.py
399 ↗(On Diff #23585)

I ported it so I can keep the built-in test from the original schnorr.py, so not a strong case. I will remove it.

This revision is now accepted and ready to land.Sep 21 2020, 14:07