In Kademlia, why is it recommended to have 160-bit node IDs and keys and not 128-bit?

南笙酒味 提交于 2021-01-28 02:06:01

问题


The Kademlia paper states that nodes are assigned random 160-bit IDs as well as the keys. Is this a strict restriction? Can I still go ahead and use a 128-bit keyspace if that's good enough from me?


回答1:


The length was chosen because SHA1, used as hash function for the hash table keys, outputs 160bits and that was the most widely used hash function at the time.

The routing algorithm itself does not require that specific length to work, all it needs is the key space being large enough to avoid collisions in randomly chosen IDs. 128bit IDs would provide 64bits of collision space, which should be sufficient unless you intend to address grey goo.

But in addition to the routing algorithm itself cryptographic concerns may also be relevant. Networks that use encryption benefit from node IDs doubling as the node's public key and commonly deployed ECC algorithms require public keys of at least 256 bits. Additionally resistance against (currently hypothetical) quantum attacks has inflated recommended hash function sizes well beyond 128 bits since they would cut collision resistance to N/3 down from N/2 for classical attacks.



来源:https://stackoverflow.com/questions/56431524/in-kademlia-why-is-it-recommended-to-have-160-bit-node-ids-and-keys-and-not-128

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!