From 34aee9c0438314f13e676bf60b4509bde9530b16 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Wed, 19 Feb 2020 00:36:26 +0000 Subject: [PATCH] Include concrete example numbers for tip on entropy encoding threshold --- doc/protocoltips.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/protocoltips.md b/doc/protocoltips.md index 610407e..9582429 100644 --- a/doc/protocoltips.md +++ b/doc/protocoltips.md @@ -1,6 +1,6 @@ # Tips for designing protocols using `libminisketch` -Sending a sketch is less efficient than just sending your whole set with efficient entropy coding if the number of differences is larger than *log2( 2b choose set_size ) / b*. +Sending a sketch is less efficient than just sending your whole set with efficient entropy coding if the number of differences is larger than *log2( 2b choose set_size ) / b*. For reasonable "real-world" values of set_size and b, this comes to roughly 60% - 90%+ of set_size. In most applications your set can be hashed to entries just large enough to make the probability of collision negligible. This can be a considerable speedup and bandwidth savings. Short hashes (<128 bits) should be salted with an unpredictable value to prevent malicious inputs from intentionally causing collisions. Salting also allows an entry missed due to a collision to be reconciled on a later run with a different salt. Pre-hashing may not be possible in some applications, such as where there is only one-way communication, where the confidentiality of entry origin matters, or where security depends on the total absence of collisions.