21 Mar, 2013

2 commits

09 Mar, 2013

9 commits

08 Mar, 2013

1 commit

07 Mar, 2013

4 commits

20 Feb, 2013

1 commit

05 Feb, 2013

5 commits

23 Jan, 2013

1 commit

18 Dec, 2012

11 commits

12 Dec, 2012

2 commits

  • tx 274f8be3b7b9b1a220285f5f71f61e2691dd04df9d69bb02a8b3b85f91fb1857 is a multisig but the second pubkey has invalid encoding.

    this isn't an issue for Bitcoin.verify_signature as it rescues invalid signatures already. but if you call script.get_address it didn't rescue if found addresses turn out to be invalid.

    Bitcoin::Script.from_string("1 0351efb6e91a31221652105d032a2508275f374cea63939ad72f1b1e02f477da78 00f2b7816db49d55d24df7bdffdbc1e203b424e8cd39f5651ab938e5e4a193569e 2 OP_CHECKMULTISIG").get_address
    => OpenSSL::PKey::EC::Point::Error: invalid encoding

    00f2b7816db49d55d24df7bdffdbc1e203b424e8cd39f5651ab938e5e4a193569e ofcourse is invalid. so lets rescue and onyl return valid addresses or nil.

    Julian Langschaedel
  • Bitcoin::Key.new(nil, ).addr did create the addr with Bitcoin.pubkey_to_address()

    this was because the Key class creates a OpenSSL::EC::Point object to check if the key is valid, and then uses this object.to_hex to recreate the key again,
    but because we didnt set the output format (compressed or uncompresed) it was always returned the uncompressed format and then using that to create the wrong address string from it.

    turns out this was wrong. below is what must happend:

    Bitcoin::Key.new(nil, ).addr creates the addr with Bitcoin.pubkey_to_address( )
    Bitcoin::Key.new(nil, ).addr creates the addr with Bitcoin.pubkey_to_address()

    Julian Langschaedel

14 Nov, 2012

1 commit

21 Oct, 2012

2 commits

03 Oct, 2012

1 commit