vbuterin/pybitcointools — pull request #65 by nelisky (2014-12-28 04:33:57+00:00)
Title: Changing the der_encode_sig padding decision to avoid non-canonical sign...

...atures.

The negative number detection for R and S was flawed, sometimes creating non-canonical signatures where no padding was added to negative numbers, so I followed what was done here: https://code.google.com/p/bitcoinj/source/browse/core/src/main/java/com/google/bitcoin/crypto/TransactionSignature.java?r=354446dd40d7153ce5197e01c8a1ffe6b705bae3#94 which fixed the problem for me.