知乎专栏 | 多维度架构 |
sha256 是一个摘要算法与常见的md5作用相同,因为区块链的数据量安全性md5,sha1都已经无法满足。实际上 sha512标准也已经出来,目前区块链主流采用 sha256,主要是考虑性能和存储空间。
目前区块链数据存储hash值占了 1/3 ~ 2/3
neo@netkiller ~ % sha256sum /etc/hosts be0b4786b1169533329b2ab5292d8d1c16bbea5bd24c882a983ab4b754a398c8 /etc/hosts neo@netkiller ~ % sha1sum /etc/hosts 48bea81a95c75efa52608a9d384126be3131e40f /etc/hosts neo@netkiller ~ % sha224sum /etc/hosts 65bf519aa94d15c3e62406b8e1f8dd8b7fb513a5dac439606f954822 /etc/hosts neo@netkiller ~ % sha384sum /etc/hosts 65478594d45d1f1054bea0f19b320607682a2c96c6efe39de9ab0a176a2623b94728937346b1ede6b92cb36c013b0d93 /etc/hosts neo@netkiller ~ % sha512sum /etc/hosts 275a4258fb570d897c67a65a65e73ac1e38cdb4166b1fdf290d7f6361892f81d663cbab51a32cf827a4d4bc26edcd0a34bed36c170dc373058f3606c02c1c5ae /etc/hosts