chainify icon indicating copy to clipboard operation
chainify copied to clipboard

Support for lowR in BitcoinJsWalletProvider

Open matthewjablack opened this issue 5 years ago • 2 comments

bitcoinjs-lib added the ability to always have low R values during transaction creation: https://github.com/bitcoinjs/bitcoinjs-lib/pull/1442

This means signature size is at most 71 bytes, and maxWitnessLen goes from 108 to 107

It also has other benefits, such as saving several bytes on txs for multisigs: https://github.com/bitcoinjs/bitcoinjs-lib/issues/1175#issuecomment-471114180

Would be great if there were a way to force low R values during transaction creation, or default to this for CAL.

matthewjablack avatar Mar 24 '21 04:03 matthewjablack

This could be as simple as modifying the lowR value in ECPair class when returning keyPair from BitcoinJsWalletProvider: https://github.com/bitcoinjs/bitcoinjs-lib/blob/533d6c2e6d0aa4111f7948b1c12003cf6ef83137/src/ecpair.js#L19

matthewjablack avatar Mar 24 '21 04:03 matthewjablack

@monokh any actions here?

kraikov avatar May 12 '22 06:05 kraikov