Closed bbbrumley closed 3 years ago
@AntonKueltz I tested with the d394335b6b6f71604a50f0c8336e62abd45936ff diff, but would appreciate it if you could independently verify!
🎉 thanks for this regression test @bbbrumley! was able to verify that this catches the regression from d394335 -
======================================================================
FAIL: test_mul_by_large (fastecdsa.tests.test_prime_field_curve_math.TestPrimeFieldCurve)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/fastecdsa/fastecdsa/tests/test_prime_field_curve_math.py", line 256, in test_mul_by_large
self.assertEqual(R, expected)
AssertionError: X: 0x203e274d51c3f652c13881df9c9ea6bbb0e11e3b7[108 chars]519>) != X: 0x6de4fd40d8d2e42039e6b5020b25164896391266c[108 chars]519>)
5ddb75238943a683b756ab9943fcdd85a3f65e29 (from #58) removed the scalar reduction modulo q, which previously yielded incorrect results for points with order different from q.
Unfortunately that broke multiplication with negative scalars. Reported in #70, fixed in bc203c56e5f785d1eaf373da2249c381e2069be1.
@AntonKueltz says
These are the regression tests for that.