lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


But DoS attacks are a concern and we can prevent it significantly with a correct hash (the current implementation is not)

It is actually quite easy to fix this in your Lua installation 

1) keep the hash as it is, set the step to 1 for long strings (and accept the corresponding slowdown)

2) change the hash to some keyed version, the key is the seed, so that hash is unpredictable; example Siphash is unpredictable  even if one could access the strings and the hashes (but is not easily portable, and very slow)

    Andrea 
--
Andrea Vitali