开花过滤器防止蛮力攻击
当输入纯粹是随机的时,Bloom过滤器很棒。如果我们知道Bloom过滤器的大小和FPP,我们可以很容易地得出所使用的hashfunction的数量。默认情况下,所有库都使用一些哈希算法,例如番石榴使用Murmur Hash。但是这些哈希功能( murmur hash特别是)不是加密哈希功能。因此,如果某人知道
- 为创建Bloom创建的元素的总数和fpp的总数,
- 这些元素已经存在于Bloom中,
那么在理论上可能有可能生成未插入Bloom Filter中的其他元素,但Bloom Filter会说出现了元素。
防止这种情况发生的策略是什么? 函数
- 哈希 哈希功能的数量很难猜测。
还有其他解决方案吗?
bloom filter are amazing when inputs are purely random. If we know the bloom filter size and fpp, we can very easily derive the number of hashfunction used. By Default all the libraries use some hashing algorithm for example guava uses murmur hash. But these hashing function(murmur hash in particular) are not cryptographic hash function. Hence if someone knows
- total number of elements and fpp for which bloom was created
- Some elements that already existing in the bloom
It might be theoretically possible to generate other elements which were not inserted in bloom filter but bloom filter will say elements are present.
What are the strategies to prevent this from happening? Few things that come to mind
- use cryptographic hash function as mentioned in this answer
- Randomize the number expected number of elements to be inserted so that total number of hash function becomes tough to guess.
Any other solutions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论