:: Re: [Libbitcoin] new ripemd generat…
Página Inicial
Delete this message
Reply to this message
Autor: Amir Taaki
Data:  
Para: Libbitcoin
Assunto: Re: [Libbitcoin] new ripemd generates different hashes
I think maybe the library just generates different hashes and is not
compatible? Or am I wrong?

> Thanks for putting the tests together Amir. I'm tied up for the next few
> hours. The most likely issue is that my port changed something
> inadvertently. Possibly the endian issue - I replaced the endianess test
> with boost's.
>
> e
>
> Sent from my iPhone
>
>> On Apr 17, 2014, at 1:20 PM, "Amir Taaki" <genjix@???> wrote:
>>
>> $ cd libbitcoin/test/
>> $ ./make.sh
>> Linking...
>> Running 8 test cases...
>> hash.cpp(32): fatal error in "sha256_hash": critical check
>> encode_hex(ripemd_hash) == "17d040b739d639c729daaf627eaff88cfe4207f4"
>> failed
>>
>> *** 1 failure detected in test suite "libbitcoin tests"
>>
>>
>>> between computer 1 (working) and computer 2 (newest). I've added a unit
>>> test for ripemd in test/ which should pass.
>>>
>>> genjix@astra1609:~$ cat test.cpp
>>> #include <bitcoin/bitcoin.hpp>
>>> using namespace bc;
>>>
>>> int main()
>>> {
>>>    std::cout << generate_ripemd_hash(data_chunk{{110}}) << std::endl;
>>>    return 0;
>>> }

>>>
>>> genjix@astra1609:~$ ./a.out
>>> 17d040b739d639c729daaf627eaff88cfe4207f4
>>>
>>> --------------------------------------------
>>>
>>> /tmp> cat rh.cpp
>>> #include <bitcoin/bitcoin.hpp>
>>> using namespace bc;
>>>
>>> int main()
>>> {
>>>        std::cout << generate_short_hash(data_chunk{{110}}) <<
>>> std::endl;
>>>            return 0;
>>> }

>>>
>>> /tmp> ./a.out
>>> 2a392d9c021a12ab0b51d90e438a54b11bf27497
>>>
>>> --------------------
>>>
>>> and when I add output to the libbitcoin ripemd hash function in the
>>> source:
>>>
>>> sha hash:
>>> 1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9
>>> ripemd hash: 17d040b739d639c729daaf627eaff88cfe4207f4
>>> 17d040b739d639c729daaf627eaff88cfe4207f4
>>>
>>> ---------------
>>> (newest)
>>>
>>> sha256:
>>> 1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9
>>> ripemd: 2a392d9c021a12ab0b51d90e438a54b11bf27497
>>> 2a392d9c021a12ab0b51d90e438a54b11bf27497
>>
>>
>> _______________________________________________
>> Libbitcoin mailing list
>> Libbitcoin@???
>> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/libbitcoin
>