gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 113/164: Salt mul 7 for salt optimization


From: gnunet
Subject: [gnunet] 113/164: Salt mul 7 for salt optimization
Date: Fri, 30 Jul 2021 15:32:59 +0200

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

grothoff pushed a commit to branch master
in repository gnunet.

commit 3301221a19ee59225c4be8a437fe690ad260a71b
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Wed May 26 14:20:17 2021 +0200

    Salt mul 7 for salt optimization
---
 src/setu/gnunet-service-setu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index 59222b2b1..2cc3ed894 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -1570,7 +1570,7 @@ salt_key (const struct IBF_Key *k_in,
           uint32_t salt,
           struct IBF_Key *k_out)
 {
-  int s = salt % 64;
+  int s = (salt * 7) % 64;
   uint64_t x = k_in->key_val;
 
   /* rotate ibf key */
@@ -1587,7 +1587,7 @@ unsalt_key (const struct IBF_Key *k_in,
             uint32_t salt,
             struct IBF_Key *k_out)
 {
-  int s = salt % 64;
+  int s = (salt * 7) % 64;
   uint64_t x = k_in->key_val;
 
   x = (x << s) | (x >> (64 - s));

-- 
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]