/*
This file is part of GNUnet
- Copyright (C) 2013-2015 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2013-2015 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
Boston, MA 02110-1301, USA.
*/
/**
- * @file set/gnunet-service-set_union.c msg->salt = htonl (op->state->salt_send);
+ * @file set/gnunet-service-set_union.c
* @brief two-peer set operations
* @author Florian Dold
{
int s = salt % 64;
uint64_t x = k_in->key_val;
+ /* rotate ibf key */
x = (x >> s) | (x << (64 - s));
k_out->key_val = x;
}
uint32_t salt,
struct IBF_Key *k_out)
{
- int s = -(salt % 64);
+ int s = salt % 64;
uint64_t x = k_in->key_val;
- x = (x >> s) | (x << (64 - s));
+ x = (x << s) | (x >> (64 - s));
k_out->key_val = x;
}
1 << msg->order);
op->state->remote_ibf = ibf_create (1<<msg->order, SE_IBF_HASH_NUM);
op->state->salt_receive = ntohl (msg->salt);
- LOG (GNUNET_ERROR_TYPE_INFO, "Receiving new IBF with salt %u\n", op->state->salt_receive);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "Receiving new IBF with salt %u\n", op->state->salt_receive);
if (NULL == op->state->remote_ibf)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,