开发者

How weak are 64 bit hashs? Can I generate a hash of length X?

I am working on an application where I need to hash binary data, and store the hash in a structure 64 bits long. I am looking for a cryptographic hash function. Ripemd-64 and elf-64 are some possibilities that I have found, but I can't find much data on them (e.g., have they been cracked with less than brute force matche开发者_运维百科s, how long they would take to break, etc). Any links or details are most welcome.

I understand that 64 bits is going to somewhat insecure due to the length of hash. I may have some additional bits to play with (72-74). The problem is that I am not a cryptographer, so I have no idea how to modify a hash function to return some hash of length X. I figure that if I can use 72 bits over 64, I will gain a much bigger hash space. How do I change a hash function so that the length is some non-standard amount?

Any help is most welcome!

Thanks, Erick


Yes, 64 bits isn't a whole lot for security purposes. It could be brute forced, depending on your application. But assuming you accept that fact and still want to move forward with it, I don't see any problem with just truncating a normal 128/256 bit hash.

Meaning, just use a strong hash function from any cryptographic library you want, and only use the first 64 bits of it. A "proper" method would be to find a hash algorithm natively outputting 64 bits, but as far as I know, people have pretty much stopped making them. It would be even harder to find an implementation available.

Having said that, I'd still urge you to look into making this data structure of yours larger.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜