gnunet-svn
[Top][All Lists]
Advanced

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

[lsd0004] branch master updated: add bloomfilter pseudo code


From: gnunet
Subject: [lsd0004] branch master updated: add bloomfilter pseudo code
Date: Tue, 30 Nov 2021 23:29:04 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository lsd0004.

The following commit(s) were added to refs/heads/master by this push:
     new b773522  add bloomfilter pseudo code
b773522 is described below

commit b773522b51292d69c532d51a62ae033ab6099a90
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Nov 30 23:28:58 2021 +0100

    add bloomfilter pseudo code
---
 draft-schanzen-r5n.xml | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/draft-schanzen-r5n.xml b/draft-schanzen-r5n.xml
index b77eff3..54ee877 100644
--- a/draft-schanzen-r5n.xml
+++ b/draft-schanzen-r5n.xml
@@ -412,6 +412,30 @@ END
           Any bloom filter uses k=16 different hash functions each of which is
           defined as follows:
         </t>
+       <figure>
+         <artwork name="" type="" align="left" alt=""><![CDATA[
+BF-TEST(key, bloomfilter)
+  H_key := SHA512 (key)
+  FOR i IN 0..15
+    bit := INT(H_key[i * k]) % 1024
+    IF bloomfilter[bit] IS SET
+      RETURN TRUE
+    END
+  END
+  RETURN FALSE
+END
+
+BF-SET(key, bloomfilter)
+  H_key := SHA512 (key)
+  FOR i IN 0..15
+    bit := INT(H_key[i * k]) % 1024
+    bloomfilter[bit] := 1
+  END
+END
+         ]]></artwork>
+     </figure>
+
+
       </section>
       <section anchor="p2p_opts" numbered="true" toc="default">
         <name>Processing options</name>

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]