Bitcoin address SHA256 pipe gives wrong output

0 votes

Step 5-6 of manual:

Calculating sha256sum secondly:

5 - Perform SHA-256 hash on the extended RIPEMD-160 result

6 - Perform SHA-256 hash on the result of the previous SHA-256 hash

I try to repeat step 6, but sha256sum is wrong:

# echo -n 445C7A8007A93D8733188288BB320A8FE2DEBD2AE1B47F0F50BC10BAE845C094 | sha256sum
7760845dcfd8c366ae89620be2f368d255d710bc7493628ca0dcded9ca476e5a  -
# echo -n 445C7A8007A93D8733188288BB320A8FE2DEBD2AE1B47F0F50BC10BAE845C094 | openssl sha256 
(stdin)= 7760845dcfd8c366ae89620be2f368d255d710bc7493628ca0dcded9ca476e5

even this wrong too:

# echo 445C7A8007A93D8733188288BB320A8FE2DEBD2AE1B47F0F50BC10BAE845C094 | openssl sha256 
(stdin)= 9edec8be4a03dd9e605f465c60ae4c77c752516f58384016c6c7384028b39f6e

I have read this: Generating a sha256 from the Linux command line

How to get: D61967F63C7DD183914A4AE452C9F6AD5D462CE3D277798075B107615C1A8A30?

Sep 5, 2018 in Blockchain by slayer
• 29,040 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You need to hash the raw byte data rather than its ASCII hex dump.

$ echo -n $'\x44\x5C\x7A\x80\x07\xA9\x3D\x87\x33\x18\x82\x88\xBB\x32\x0A\x8F\xE2\xDE\xBD\x2A\xE1\xB4\x7F\x0F\x50\xBC\x10\xBA\xE8\x45\xC0\x94' | sha256sum
d61967f63c7dd183914a4ae452c9f6ad5d462ce3d277798075b107615c1a8a30  -
$ echo -n $'\x44\x5C\x7A\x80\x07\xA9\x3D\x87\x33\x18\x82\x88\xBB\x32\x0A\x8F\xE2\xDE\xBD\x2A\xE1\xB4\x7F\x0F\x50\xBC\x10\xBA\xE8\x45\xC0\x94' | openssl sha256
(stdin)= d61967f63c7dd183914a4ae452c9f6ad5d462ce3d277798075b107615c1a8a30
answered Sep 5, 2018 by digger
• 27,620 points

Related Questions In Blockchain

0 votes
1 answer

How Bitcoin wallet find unspent transaction output(UTXOs)?

The wallet apps are connected to the ...READ MORE

answered May 22, 2018 in Blockchain by Shashank
• 10,330 points
0 votes
1 answer

How are unique public address generated in bitcoin?

In brief, the public addresses are generated ...READ MORE

answered Jul 16, 2018 in Blockchain by slayer
• 29,040 points
+3 votes
3 answers

How to validate bitcoin address?

I found these 2 scripts online: Javascript: <html> <head> <script type="text/javascript" ...READ MORE

answered Aug 17, 2018 in Blockchain by slayer
• 29,040 points
0 votes
1 answer

How to generate Bitcoin address?

Convert the hex string back to bytes ...READ MORE

answered Aug 20, 2018 in Blockchain by slayer
• 29,040 points
0 votes
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by ariaholic
• 7,320 points
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
0 votes
1 answer
0 votes
1 answer

How to extract h160 address of bitcoin blockchain?

You can extract the data using the ...READ MORE

answered Jul 16, 2018 in Blockchain by digger
• 27,620 points
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.