MidLevel / Ruffles

Lightweight and fully managed reliable UDP library.
MIT License
212 stars 28 forks source link

Hashcash should use stronger hash #30

Open paulpach opened 3 years ago

paulpach commented 3 years ago

Describe the bug FNV is not suitable for Hashcash. https://github.com/MidLevel/Ruffles/blob/3f0c5824e84a12c9eee29a4a268632bb7d23f045/Ruffles/Hashing/HashCash.cs#L23

Any math undergrad can break this in his spare time. You need a stronger cryptographic algorithm for hashcash. The state of the art appears to be sha256, or at least sha1: https://en.bitcoin.it/wiki/Hashcash#Hash_function_choices