Skip to main content
Fig. 1 | Cybersecurity

Fig. 1

From: Performance evaluation of Cuckoo filters as an enhancement tool for password cracking

Fig. 1

An example of the Cuckoo Filter operation using a bit array of size 18 (m = 18), each bucket can store only one fingerprint (b = 1), and the fingerprint length in bits is 5 (f = 5). The hash function is hash(x) = 2*x mod 18 and fingerprint(x) = (x − 1) mod 18. (a) Inserting elements: To insert item 93, the value fingerprint(93) = 2 should be stored either in position h1(93) = 6 or in position h2(93) = 2, because position 6 is occupied the value 2 is inserted in position 2. To insert item 20, the value 1 should be stored either in position 4 or in position 7, both are available, so the value 1 is inserted in position 4. To insert item 24, the value 5 should be stored either in position 12 or in position 6, and both buckets are occupied. Consequently, we randomly choose bucket 6 and displace the current fingerprint 10 to its alternate bucket 4. To calculate the alternate bucket, we know that h1(x) = 6, then h2(x) = 6  hash(10) = 6  2 = 4, so the new location should be position 4. Because bucket 4 is also in use, we displace the current fingerprint 1 to its alternate bucket 7 (if h1(x) = 4 then h2(x) = 4  hash(1) = 4  2 = 7), which is free. (b) Verifying membership: To test the membership of element 15, we calculate its fingerprint, fingerprint(15) = 14, and the two possible buckets where the fingerprint could be located (positions h1(15) = 12 and h2(15) = 6), because position 12 stores the fingerprint of item 15, we can state that the item belongs to the set with a non-zero false-positive rate

Back to article page