python-bloomfilter icon indicating copy to clipboard operation
python-bloomfilter copied to clipboard

HMAC enabled Bloom filter and Scalable Bloom Filter

Open AmritKumar opened this issue 11 years ago • 2 comments

Provides an HMAC extension to the existing implementation. The filters now also have the possibility to use keyed hash functions.

AmritKumar avatar Aug 22 '14 09:08 AmritKumar

My guess is you're trying to do something similar to what is outlined here? – https://www.uni-due.de/~hq0215/documents/Draft_Ottawa_Bloom.pdf

A couple of things are sticking out to me immediately:

  1. hashmac should be a boolean since it's a flag. But, this might be mitigated by...
  2. I'm thinking this functionality should be a subclass of the filter itself instead of a flag, e.g. HMACBloomFilter, etc.

What do you think?

jaybaird avatar Aug 22 '14 17:08 jaybaird

Basically, one would wish to use hmac instead of hash function in a scenario where only specific entities have the right to insert elements in the filter or check for belonging in it. To this end, the entities may share a common secret key and generate hmac for each item. Similarly checking for belonging would require ownership of the key. Such a filter may prevent Denial-of-service attacks against certain services.

Indeed, a more cleaner code would be to create a subclass HMACBloomFilter which would have an attribute key.

AmritKumar avatar Aug 22 '14 22:08 AmritKumar