But shouldn't we all be 100% RFC 6979 compliant if possible?
Here's some of the repos I cleaned up.
https://github.com/bitpay/bitcore/pull/884
The 1 badrs (aka forcing it to loop once) gave me a different value. It turns out you missed one of the v = hmac_k(v) steps during the loop.
Adding one extra v = hmac_k(v) in each loop makes it match up with python-ecdsa perfectly (I even tried up to badrs = 30 and it was fine.
https://tools.ietf.org/html/rfc6979#section-3.2
If you follow Step h from after the k = bits2int(T) downward, then back up to the beginning of Step h to loop.
K = HMAC_K(V || 0x00)
V = HMAC_K(V)
Empty T
V = HMAC_K(V)
T = V (since we know tlen == qlen)
k = bits2int(T)
Including this commit will make the behavior be 100% rfc 6979 compliant.
https://github.com/blockchain/My-Wallet/pull/115
The way bitcore implements this is by including an integer called "badrs" that will force entering the re-hashing loop of Step h. The incrementing of badrs is done in a do while loop around k generation and r and s calculation.
Edit: Just put in PR to bitcoinjs-lib:
https://github.com/bitcoinjs/bitcoinjs-lib/pull/336