bitcoinjs / tiny-secp256k1

A tiny secp256k1 native/JS wrapper
MIT License
92 stars 55 forks source link

Isolate RFC6979 for unit testing #17

Closed dcousens closed 6 years ago

dcousens commented 6 years ago

Based on https://github.com/bitcoinjs/tiny-secp256k1/pull/16

I don't know if this is the best way to do this, would appreciate some opinions. Simply for peace of mind that our original RFC6979 impl. is specifically tested (as it was previously).

dcousens commented 6 years ago

@junderw this is relevant before your PR

dcousens commented 6 years ago

@junderw any opinions on the approach token?

junderw commented 6 years ago

Nope. This is pretty good. We are able to test that the loop function works.

tbh, 0 and 1 are the only ones we really need to test... not sure why I made fixtures for 5, 15, etc. lol (These fixtures are the tests I made when implementing RFC6979 for coinbin.)

But it doesn't take too long so as is is fine.

dcousens commented 6 years ago

@junderw it doens't hurt to verify the internal consistency with up to k:15 IMHO.